eval.in

Paste #40208

Ruby — MRI 2.0.0, pasted 8 months ago

1
2
3
4
5
6
7
p begin
  class A; def self.foo; "FOO" end; end; class B < A; end; B.public_methods(false)
rescue Exception => e
  puts "#{e} (#{e.class})"
  $stdout.flush
  raise e
end

Program Output

[:foo, :allocate, :new, :superclass]

OK (0.032 sec real, 0.108 sec wall, 8 MB, 41 syscalls)

Fork