Skip to content

Instantly share code, notes, and snippets.

@timfel
Created December 6, 2011 20:43
Show Gist options
  • Save timfel/1439913 to your computer and use it in GitHub Desktop.
Save timfel/1439913 to your computer and use it in GitHub Desktop.
~ maglev ✔ maglev-irb -f
irb(main):001:0> b = proc { p 1 }
=> #<Proc>
irb(main):002:0> b.instance_variable_get("@_st_block")
=> #<ExecBlock:0x561a6201
irb(main):003:0> block = b.instance_variable_get("@_st_block")
=> #<ExecBlock:0x561a6201
irb(main):004:0> block.class
=> ExecBlock
irb(main):005:0> block.class.primitive '_sourceString', '_sourceString'
=> ExecBlock
irb(main):006:0> block._sourceString
=> "\"This is source for a block. \" \n ^ { p 1 }"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment