Project

General

Profile

Bug #14846

Backport fixes for Kernel#warn(uplevel:)

Added by Eregon (Benoit Daloze) 10 days ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]
[ruby-core:87487]

Description

-> { warn("foo", 100) }.should output(nil, "warning: foo\n")

It is missing the "warning: " prefix in 2.5.1.

-> { warn "", uplevel: -1 }.should raise_error(ArgumentError)

It doesn't raise in 2.5.1 even though warn "", uplevel: -2 does.

Both were fixed on trunk.
I believe it should be fixed in 2.5 as that is buggy behavior.

Then https://github.com/ruby/spec/commit/dea70b1c50f2cba7624b764fea639edfcff11ced can be reverted.

Associated revisions

Revision 63650
Added by Eregon (Benoit Daloze) 10 days ago

Fix condition in Kernel#warn when using uplevel

History

#1 [ruby-core:87520] Updated by nagachika (Tomoyuki Chikanaga) 5 days ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: DONTNEED, 2.4: DONTNEED, 2.5: REQUIRED
  • Status changed from Open to Closed

Thank you for your notice.
I will backport r63650.

Also available in: Atom PDF