Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >> 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
Add Comment
Please, Sign In to add comment