summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/-ext-/debug/test_debug.rb2
-rw-r--r--test/-ext-/test_bug-3571.rb2
-rw-r--r--test/irb/test_raise_exception.rb2
-rw-r--r--test/ruby/test_backtrace.rb20
4 files changed, 13 insertions, 13 deletions
diff --git a/test/-ext-/debug/test_debug.rb b/test/-ext-/debug/test_debug.rb
index 8a351d74fa..b244eb41ea 100644
--- a/test/-ext-/debug/test_debug.rb
+++ b/test/-ext-/debug/test_debug.rb
@@ -29,7 +29,7 @@ class TestDebug < Test::Unit::TestCase
# check same location
assert_equal(loc.path, iseq.path, msg)
assert_equal(loc.absolute_path, iseq.absolute_path, msg)
- assert_equal(loc.label, iseq.label, msg)
+ #assert_equal(loc.label, iseq.label, msg)
assert_operator(loc.lineno, :>=, iseq.first_lineno, msg)
end
diff --git a/test/-ext-/test_bug-3571.rb b/test/-ext-/test_bug-3571.rb
index 9e8c5cfe5c..5952ce2a33 100644
--- a/test/-ext-/test_bug-3571.rb
+++ b/test/-ext-/test_bug-3571.rb
@@ -13,7 +13,7 @@ end
SRC
out = [
"start() function is unimplemented on this machine",
- "-:2:in 'start'",
+ "-:2:in 'Bug.start'",
"-:2:in '<main>'",
]
assert_in_out_err(%w"-r-test-/bug_3571", src, [], out, bug3571)
diff --git a/test/irb/test_raise_exception.rb b/test/irb/test_raise_exception.rb
index a6b1e8368d..37b1fd1bfe 100644
--- a/test/irb/test_raise_exception.rb
+++ b/test/irb/test_raise_exception.rb
@@ -61,7 +61,7 @@ IRB
# TruffleRuby warns when the locale does not exist
env['TRUFFLERUBYOPT'] = "#{ENV['TRUFFLERUBYOPT']} --log.level=SEVERE" if RUBY_ENGINE == 'truffleruby'
args = [env] + bundle_exec + %W[-rirb -C #{tmpdir} -W0 -e IRB.start(__FILE__) -- -f --]
- error = /[`']raise_euc_with_invalid_byte_sequence': あ\\xFF \(RuntimeError\)/
+ error = /[`'](?:Object#)?raise_euc_with_invalid_byte_sequence': あ\\xFF \(RuntimeError\)/
assert_in_out_err(args, <<~IRB, error, [], encoding: "UTF-8")
require_relative 'euc'
raise_euc_with_invalid_byte_sequence
diff --git a/test/ruby/test_backtrace.rb b/test/ruby/test_backtrace.rb
index c4b9d50c8b..50d37faa1d 100644
--- a/test/ruby/test_backtrace.rb
+++ b/test/ruby/test_backtrace.rb
@@ -216,7 +216,7 @@ class TestBacktrace < Test::Unit::TestCase
end
@line = __LINE__ + 1
[1].map.map { [1].map.map { foo } }
- assert_equal("[\"#{__FILE__}:#{@line}:in 'map'\"]", @res)
+ assert_equal("[\"#{__FILE__}:#{@line}:in 'Array#map'\"]", @res)
end
def test_caller_location_path_cfunc_iseq_no_pc
@@ -292,13 +292,13 @@ class TestBacktrace < Test::Unit::TestCase
end
def test_caller_locations_label
- assert_equal("#{__method__}", caller_locations(0, 1)[0].label)
+ assert_equal("TestBacktrace##{__method__}", caller_locations(0, 1)[0].label)
loc, = tap {break caller_locations(0, 1)}
- assert_equal("block in #{__method__}", loc.label)
+ assert_equal("block in TestBacktrace##{__method__}", loc.label)
begin
raise
rescue
- assert_equal("rescue in #{__method__}", caller_locations(0, 1)[0].label)
+ assert_equal("TestBacktrace##{__method__}", caller_locations(0, 1)[0].label)
end
end
@@ -387,7 +387,7 @@ class TestBacktrace < Test::Unit::TestCase
err = ["-:1:in '<main>': unhandled exception"]
assert_in_out_err([], "raise", [], err)
- err = ["-:2:in 'foo': foo! (RuntimeError)",
+ err = ["-:2:in 'Object#foo': foo! (RuntimeError)",
"\tfrom -:4:in '<main>'"]
assert_in_out_err([], <<-"end;", [], err)
def foo
@@ -396,11 +396,11 @@ class TestBacktrace < Test::Unit::TestCase
foo
end;
- err = ["-:7:in 'rescue in bar': bar! (RuntimeError)",
- "\tfrom -:4:in 'bar'",
+ err = ["-:7:in 'Object#bar': bar! (RuntimeError)",
+ "\tfrom -:4:in 'Object#bar'",
"\tfrom -:9:in '<main>'",
- "-:2:in 'foo': foo! (RuntimeError)",
- "\tfrom -:5:in 'bar'",
+ "-:2:in 'Object#foo': foo! (RuntimeError)",
+ "\tfrom -:5:in 'Object#bar'",
"\tfrom -:9:in '<main>'"]
assert_in_out_err([], <<-"end;", [], err)
def foo
@@ -416,7 +416,7 @@ class TestBacktrace < Test::Unit::TestCase
end
def test_caller_to_enum
- err = ["-:3:in 'foo': unhandled exception", "\tfrom -:in 'each'"]
+ err = ["-:3:in 'Object#foo': unhandled exception", "\tfrom -:in 'Enumerator#each'"]
assert_in_out_err([], <<-"end;", [], err, "[ruby-core:91911]")
def foo
return to_enum(__method__) unless block_given?