summaryrefslogtreecommitdiff
path: root/sample/export.rb
blob: 3a6a8198dfc0ca7eef145949277a4db54c7aec36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class foo
  export(\printf)
end

def foobar
  print "foobar\n"
end

f = foo.new
#foo.unexport(\printf)
foo.export(\foobar)
f.foobar
f.printf "%s\n", foo