git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
16 lines
335 B
Ruby
16 lines
335 B
Ruby
require 'smart_pointer_overload'
|
|
|
|
include Smart_pointer_overload
|
|
|
|
f = Foo.new
|
|
b = Bar.new(f)
|
|
|
|
|
|
raise RuntimeError if f.test(3) != 1
|
|
raise RuntimeError if f.test(3.5) != 2
|
|
raise RuntimeError if f.test("hello") != 3
|
|
|
|
raise RuntimeError if b.test(3) != 1
|
|
raise RuntimeError if b.test(3.5) != 2
|
|
raise RuntimeError if b.test("hello") != 3
|
|
|
|
|