diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-07 05:38:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-07 05:38:37 +0000 |
commit | 89f041957548302af46d71e3c97fa58415677c8a (patch) | |
tree | bd458239934fc1c7a5ae17e3dcba270a891be1ed /test/ruby/test_exception.rb | |
parent | ac4d348d458defd030c548f608e0b0882a9c705a (diff) |
eval_error.c: reset in each line
* eval_error.c (print_errinfo): reset in each line, so that
Exception#full_message ends with a newline and puts will not
print an extra newline.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_exception.rb')
-rw-r--r-- | test/ruby/test_exception.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 386d736d16..98462bef93 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -1113,6 +1113,9 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status| end def test_full_message + message = RuntimeError.new("testerror").full_message + assert_operator(message, :end_with?, "\n") + test_method = "def foo; raise 'testerror'; end" out1, err1, status1 = EnvUtil.invoke_ruby(['-e', "#{test_method}; begin; foo; rescue => e; puts e.full_message; end"], '', true, true) |