Initial implementation of polymorphism stuff for Ruby; still under
construction. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4725 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3b740345b2
commit
fa05d8f3d7
2 changed files with 929 additions and 36 deletions
18
Examples/test-suite/ruby/director_basic_runme.rb
Normal file
18
Examples/test-suite/ruby/director_basic_runme.rb
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
require 'director_basic'
|
||||
|
||||
class MyFoo < Director_basic::Foo
|
||||
def ping
|
||||
"MyFoo::ping()"
|
||||
end
|
||||
end
|
||||
|
||||
a = MyFoo.new
|
||||
|
||||
raise RuntimeError if a.ping != "MyFoo::ping()"
|
||||
raise RuntimeError if a.pong != "Foo::pong();MyFoo::ping()"
|
||||
|
||||
b = Director_basic::Foo.new
|
||||
|
||||
raise RuntimeError if b.ping != "Foo::ping()"
|
||||
raise RuntimeError if b.pong != "Foo::pong();Foo::ping()"
|
||||
|
||||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue