diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index 898103312..8eee36bad 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -511,7 +511,7 @@ def test_show_source def test_show_source_end_finder pend if RUBY_ENGINE == 'truffleruby' - code = <<~EOS.gsub(/^/, ' ' * 4); eval(code, binding, __FILE__, __LINE__ + 1) unless respond_to?(:show_source_test_method) + eval(code = <<-EOS, binding, __FILE__, __LINE__ + 1) def show_source_test_method unless true end @@ -549,11 +549,5 @@ def test_whereami assert_empty err assert_match(/^From: .+ @ line \d+ :\n/, out) end - - # This method is used for testing show_source command - def show_source_test_method - unless true - end - end end end