diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-05-26 20:14:18 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2024-05-26 20:14:18 +0900 |
| commit | bc50f2a3f1d166be3899f32b81bb78f666000592 (patch) | |
| tree | e29a8598ab348188b94cac94fa7a1a10158c6a74 /test | |
| parent | 0f9e50b8c5554d5a6a3f19044d0c9e276b7d414b (diff) | |
Debug unexpectedly changed path
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_literal.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/ruby/test_literal.rb b/test/ruby/test_literal.rb index c6154af1f6..b0fd4680b3 100644 --- a/test/ruby/test_literal.rb +++ b/test/ruby/test_literal.rb @@ -640,11 +640,16 @@ class TestRubyLiteral < Test::Unit::TestCase end begin r2 = eval(s) - rescue NameError, SyntaxError + rescue SyntaxError => e + r2 = :err + rescue NameError r2 = :err end r2 = :err if Range === r2 - assert_equal(r1, r2, "Float(#{s.inspect}) != eval(#{s.inspect})") + s = s.inspect + mesg = "Float(#{s}) != eval(#{s})" + mesg << ":" << e.message if e + assert_equal(r1, r2, mesg) } } } |
