diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 4d256a73a..0d41cc03a 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -50,9 +50,9 @@ def test_evaluate_with_exception end def test_evaluate_with_encoding_error_without_lineno - pend if RUBY_ENGINE == 'truffleruby' - assert_raise_with_message(EncodingError, /invalid symbol/) { - @context.evaluate(%q[{"\xAE": 1}], 1) + # TruffleRuby adds 'encoding' in the middle of the message + assert_raise_with_message(EncodingError, /invalid( encoding)? symbol/) { + @context.evaluate(%q[:"\xAE"], 1) # The backtrace of this invalid encoding hash doesn't contain lineno. } end