mirror of
https://github.com/ruby/ruby.git
synced 2025-09-16 00:54:01 +02:00
error.c: send as a single string
* error.c (rb_warn_m): send the arguments as a single string concatenated with a newline, so it can be filtered easily. [ruby-core:80875] [Feature #12944] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6a4061ce30
commit
d249b047c2
2 changed files with 23 additions and 2 deletions
|
@ -973,6 +973,10 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
|||
def test_warning_warn
|
||||
warning = capture_warning_warn {@a}
|
||||
assert_match(/instance variable @a not initialized/, warning[0])
|
||||
|
||||
assert_equal(["a\nz\n"], capture_warning_warn {warn "a\n", "z"})
|
||||
assert_equal([], capture_warning_warn {warn})
|
||||
assert_equal(["\n"], capture_warning_warn {warn ""})
|
||||
end
|
||||
|
||||
def test_warning_warn_invalid_argument
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue