/tags/rel-1-3-29/SWIG/Examples/test-suite/ruby/smart_pointer_multi_runme.rb
Ruby | 15 lines | 10 code | 5 blank | 0 comment | 4 complexity | ea9476bb4233ccb859e3e2de16fb9716 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
- require 'smart_pointer_multi'
- include Smart_pointer_multi
- f = Foo.new
- b = Bar.new(f)
- s = Spam.new(b)
- g = Grok.new(b)
- s.x = 3
- raise RuntimeError if s.getx() != 3
- g.x = 4
- raise RuntimeError if g.getx() != 4