/usr/share/doc/ruby1.8-examples/examples/export.rb is in ruby1.8-examples 1.8.7.352-2ubuntu1.6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # method access permission
# output:
# foobar
# Foo
class Foo
public :printf
def baz
print "baz\n"
end
private :baz
def quux
print "in QUUX "
baz()
end
end
def foobar
print "foobar\n"
end
f = Foo.new
#Foo.private :printf
class Foo # redefines foobar's scope
public :foobar
end
f.foobar
f.printf "%s\n", Foo
f.quux
class Bar<Foo
def quux
super
baz()
end
end
Bar.new.quux
|