mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
Debug unexpectedly changed path
This commit is contained in:
parent
0f9e50b8c5
commit
bc50f2a3f1
2 changed files with 11 additions and 4 deletions
|
@ -640,11 +640,16 @@ class TestRubyLiteral < Test::Unit::TestCase
|
|||
end
|
||||
begin
|
||||
r2 = eval(s)
|
||||
rescue NameError, SyntaxError
|
||||
rescue SyntaxError => e
|
||||
r2 = :err
|
||||
rescue NameError
|
||||
r2 = :err
|
||||
end
|
||||
r2 = :err if Range === r2
|
||||
assert_equal(r1, r2, "Float(#{s.inspect}) != eval(#{s.inspect})")
|
||||
s = s.inspect
|
||||
mesg = "Float(#{s}) != eval(#{s})"
|
||||
mesg << ":" << e.message if e
|
||||
assert_equal(r1, r2, mesg)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue