Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## [ruby]
- procs = {
- :return => proc { return },
- :next => proc { next },
- :break => proc { break }
- }
- procs.each do |name, blk|
- puts name
- begin
- blk.call
- rescue Exception => e
- p e
- end
- end
- ## output [plain_text]
- return
- #<LocalJumpError: unexpected return>
- next
- break
Add Comment
Please, Sign In to add comment