diff options
| author | KOBAYASHI Shuji <[email protected]> | 2021-02-05 23:14:58 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2021-02-05 23:14:58 +0900 |
| commit | 80965fe2d773d4a26bc9a89e5ea5d60c65d9e394 (patch) | |
| tree | 6488713cdb4b9012e089a92f1d6ae6a27cd1155c | |
| parent | 043fe9d9f5ab13063683881a981f24489d3f7335 (diff) | |
| download | mruby-80965fe2d773d4a26bc9a89e5ea5d60c65d9e394.tar.gz mruby-80965fe2d773d4a26bc9a89e5ea5d60c65d9e394.zip | |
Fix message of `ThrowCatchJump` in `mruby-catch` gem
### Example
```ruby
begin
throw 1
rescue Exception => e
puts e.message
end
```
#### Before this patch:
```console
$ bin/mruby example.rb
uncaught throw :1
```
#### After this patch (same as Ruby):
```console
$ bin/mruby example.rb
uncaught throw 1
```
| -rw-r--r-- | mrbgems/mruby-catch/mrblib/catch.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-catch/mrblib/catch.rb b/mrbgems/mruby-catch/mrblib/catch.rb index 89eedf66a..f8dcb3e84 100644 --- a/mrbgems/mruby-catch/mrblib/catch.rb +++ b/mrbgems/mruby-catch/mrblib/catch.rb @@ -2,7 +2,7 @@ class ThrowCatchJump < Exception def initialize(tag, val) @tag = tag @val = val - super("uncaught throw :#{tag}") + super("uncaught throw #{tag.inspect}") end def _tag @tag |
