/tags/rel-1-3-26/SWIG/Examples/test-suite/ruby/overload_subtype_runme.rb

# · Ruby · 15 lines · 10 code · 5 blank · 0 comment · 4 complexity · 9ca07d20749c8cae1b436cfc37f749db MD5 · raw file

  1. require 'overload_subtype'
  2. include Overload_subtype
  3. f = Foo.new
  4. b = Bar.new
  5. if spam(f) != 1
  6. raise RuntimeError, "foo"
  7. end
  8. if spam(b) != 2
  9. raise RuntimeError, "bar"
  10. end