summaryrefslogtreecommitdiff
path: root/test/ruby/test_iseq.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby/test_iseq.rb')
-rw-r--r--test/ruby/test_iseq.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb
index f2d11cdb7e..dda70ac7dd 100644
--- a/test/ruby/test_iseq.rb
+++ b/test/ruby/test_iseq.rb
@@ -246,9 +246,12 @@ class TestISeq < Test::Unit::TestCase
end
end
assert_equal([m1, e1.message], [m2, e2.message], feature11951)
- e1, *, e2 = e1.message.lines
- assert_send([e1, :start_with?, __FILE__])
- assert_send([e2, :start_with?, __FILE__])
+ message = e1.message.each_line
+ message.with_index(1) do |line, i|
+ next if /^ / =~ line
+ assert_send([line, :start_with?, __FILE__],
+ proc {message.map {|l, j| (i == j ? ">" : " ") + l}.join("")})
+ end
end
def test_compile_file_error