Skip to content

Instantly share code, notes, and snippets.

Created June 4, 2012 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2868864 to your computer and use it in GitHub Desktop.
Save anonymous/2868864 to your computer and use it in GitHub Desktop.
[br@silver:/tmp]% irb19
irb(main):001:0> require 'sourcify'
=> true
irb(main):002:0> later = Proc.new { Thread.new { sleep 11; puts "hi" } }
=> #<Proc:0x9589fa4@(irb):2>
irb(main):004:0> later.to_source( :ignore_nested => true )
=> "proc do\n Thread.new do\n sleep(11)\n puts(\"hi\")\n end\nend"
irb(main):005:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment