Made a test more robust

Against changes of the `assert_separately` prologue code.
上级 dedcf62b
......@@ -2393,7 +2393,10 @@ def foo; end
def test_inspect_segfault
bug_10282 = '[ruby-core:65214] [Bug #10282]'
assert_separately [], <<-RUBY
assert_separately [], "#{<<~"begin;"}\n#{<<~'end;'}"
bug_10282 = "#{bug_10282}"
begin;
line = __LINE__ + 2
module ShallowInspect
def shallow_inspect
"foo"
......@@ -2410,9 +2413,9 @@ class A
A.prepend InspectIsShallow
expect = "#<Method: A(ShallowInspect)#inspect(shallow_inspect)() -:7>"
assert_equal expect, A.new.method(:inspect).inspect, "#{bug_10282}"
RUBY
expect = "#<Method: A(ShallowInspect)#inspect(shallow_inspect)() -:#{line}>"
assert_equal expect, A.new.method(:inspect).inspect, bug_10282
end;
end
def test_define_method_with_unbound_method
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册