diff options
Diffstat (limited to 'mrbgems/mruby-catch/mrblib')
| -rw-r--r-- | mrbgems/mruby-catch/mrblib/catch.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/mrbgems/mruby-catch/mrblib/catch.rb b/mrbgems/mruby-catch/mrblib/catch.rb index c69cd125e..8e5f59023 100644 --- a/mrbgems/mruby-catch/mrblib/catch.rb +++ b/mrbgems/mruby-catch/mrblib/catch.rb @@ -6,17 +6,3 @@ class UncaughtThrowError < ArgumentError super("uncaught throw #{tag.inspect}") end end - -module Kernel - def catch(tag=Object.new, &block) - # A double closure is required to make the nested `catch` distinguishable - # and because `break` goes back to `proc->upper`. - -> { -> { block.call(tag) }.call }.call - end - def throw(tag, val=nil) - __throw(tag, val) - raise UncaughtThrowError.new(tag, val) - end - - __preserve_catch_method -end |
