aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/ruby/smart_pointer_simple_runme.rb
blob: b2a54b819200a2193241b08d841523ff5f2374ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require 'smart_pointer_simple'

include Smart_pointer_simple

f = Foo.new
b = Bar.new(f)

b.x = 3
raise RuntimeError if b.getx() != 3

fp = b.__deref__()
fp.x = 4
raise RuntimeError if fp.getx() != 4