PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  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