PageRenderTime 18ms CodeModel.GetById 16ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Examples/test-suite/ruby/smart_pointer_const_runme.rb

#
Ruby | 13 lines | 9 code | 4 blank | 0 comment | 4 complexity | 299340d18f38c7308a57e5c1fd67f5af MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
 1require 'smart_pointer_const'
 2
 3include Smart_pointer_const
 4
 5f = Foo.new
 6b = Bar.new(f)
 7
 8b.x = 3
 9raise RuntimeError if b.getx() != 3
10
11fp = b.__deref__()
12fp.x = 4
13raise RuntimeError if fp.getx() != 4
14