From 80965fe2d773d4a26bc9a89e5ea5d60c65d9e394 Mon Sep 17 00:00:00 2001 From: KOBAYASHI Shuji Date: Fri, 5 Feb 2021 23:14:58 +0900 Subject: 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 ``` --- mrbgems/mruby-catch/mrblib/catch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3