mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 01:23:57 +02:00
eval_error.c: fix underflow
* eval_error.c (print_errinfo): get rid of negative string length. [ruby-core:86086] [Bug #14598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7773cfa496
commit
2851b2c55f
2 changed files with 10 additions and 4 deletions
|
@ -1254,5 +1254,13 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
|||
|
||||
_, err2, status1 = EnvUtil.invoke_ruby(['-e', "#{test_method}; begin; foo; end"], '', true, true)
|
||||
assert_equal(err2, out1)
|
||||
|
||||
if $stderr.tty?
|
||||
e = RuntimeError.new("a\n")
|
||||
message = assert_nothing_raised(ArgumentError, proc {e.pretty_inspect}) do
|
||||
e.full_message
|
||||
end
|
||||
assert_operator(message, :end_with?, "\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue