p = Proc.new{ puts 'ok' }
Is is possible to see the ruby code in the proc?
inspect
returns the memory location:
puts p.inspect
#<Proc:0x007f9e42980b88@(irb):2>
Ruby 1.9.3
Take a look at the sourcify gem:
proc { x + y }.to_source
# >> "proc { (x + y) }"