PageRenderTime 10ms CodeModel.GetById 8ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/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
 1require 'smart_pointer_multi'
 2
 3include Smart_pointer_multi
 4
 5f = Foo.new
 6b = Bar.new(f)
 7s = Spam.new(b)
 8g = Grok.new(b)
 9
10s.x = 3
11raise RuntimeError if s.getx() != 3
12
13g.x = 4
14raise RuntimeError if g.getx() != 4
15
16