diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-02-12 21:10:53 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-02-12 21:10:53 +0900 |
| commit | d3fbac4d53de338bc5560b985fb7e51112d3cab3 (patch) | |
| tree | 499188e9ff794d40bd9824abb1554610decfa058 /mrbgems/mruby-catch/mrblib/catch.rb | |
| parent | 5f71e0e7548624f3ef5b3eb5b9be666da7cc752d (diff) | |
| parent | 955464ca3cf408a14ae98b1e93afe31023219af9 (diff) | |
| download | mruby-d3fbac4d53de338bc5560b985fb7e51112d3cab3.tar.gz mruby-d3fbac4d53de338bc5560b985fb7e51112d3cab3.zip | |
Merge pull request #5335 from shuujii/add-UncaughtThrowError-tagvalue-for-Ruby-compatibility
Add `UncaughtThrowError#{tag,value}` for Ruby compatibility
Diffstat (limited to 'mrbgems/mruby-catch/mrblib/catch.rb')
| -rw-r--r-- | mrbgems/mruby-catch/mrblib/catch.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mrbgems/mruby-catch/mrblib/catch.rb b/mrbgems/mruby-catch/mrblib/catch.rb index 8e5f59023..9a60a67a3 100644 --- a/mrbgems/mruby-catch/mrblib/catch.rb +++ b/mrbgems/mruby-catch/mrblib/catch.rb @@ -1,8 +1,8 @@ class UncaughtThrowError < ArgumentError - attr_reader :_tag, :_val - def initialize(tag, val) - @_tag = tag - @_val = val + attr_reader :tag, :value + def initialize(tag, value) + @tag = tag + @value = value super("uncaught throw #{tag.inspect}") end end |
