Skip to content

Instantly share code, notes, and snippets.

@wycats
Created August 24, 2008 22:00
Show Gist options
  • Save wycats/7011 to your computer and use it in GitHub Desktop.
Save wycats/7011 to your computer and use it in GitHub Desktop.
>> def awesome
>> x = 7
>> proc { self * x }
>> end
=> nil
>> awesome
=> #<Proc:0x00368b84@(irb):3>
>> awesome[]
NoMethodError: undefined method `*' for main:Object
from (irb):3:in `awesome'
from (irb):6:in `[]'
from (irb):6
from :0
>> 12.instance_eval(&awesome)
=> 84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment