diff options
| author | tomoya ishida <tomoyapenguin@gmail.com> | 2023-06-28 05:43:48 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2023-06-27 20:43:53 +0000 |
| commit | 8aedfefb21bb44fb043f29692e807033d26dfda5 (patch) | |
| tree | c062280095b9b141dc069e572537d71cb55a4793 /test | |
| parent | caddd0274b6c859ab4a55ae033c4bc69c85a0fa9 (diff) | |
[ruby/irb] Remove keyword exception from Context#evaluate because
the value is always nil
(https://github.com/ruby/irb/pull/617)
https://github.com/ruby/irb/commit/62691384f8
Diffstat (limited to 'test')
| -rw-r--r-- | test/irb/test_context.rb | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 5efbf045f2..6ce0cb1228 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -37,20 +37,6 @@ module TestIRB assert_same(obj, @context.evaluate('_', 1)) end - def test_evaluate_with_exception - assert_nil(@context.evaluate("$!", 1)) - e = assert_raise_with_message(RuntimeError, 'foo') { - @context.evaluate("raise 'foo'", 1) - } - assert_equal('foo', e.message) - assert_same(e, @context.evaluate('$!', 1, exception: e)) - e = assert_raise(SyntaxError) { - @context.evaluate("1,2,3", 1, exception: e) - } - assert_match(/\A\(irb\):1:/, e.message) - assert_not_match(/rescue _\.class/, e.message) - end - def test_evaluate_with_encoding_error_without_lineno assert_raise_with_message(EncodingError, /invalid symbol/) { @context.evaluate(%q[:"\xAE"], 1) |
