From: shyouhei@... Date: 2016-12-21T13:41:34+00:00 Subject: [ruby-core:78776] [Ruby trunk Feature#12944] Change Kernel#warn to call Warning.warn Issue #12944 has been updated by Shyouhei Urabe. So we discussed at today's developer meeting. Attendees felt in common that Kernel#warn's complicated pitfall-ish behaviour is not useful very much. Does anybody actually pass array to it? Warning.warn is much straight-forward. It makes relatively less sense to emulate Kernel#warn's old corner cases using Warning.warn. We want to re-think Kernel#warn API. In order to do so 2.4 is too immediate. Let us leave it as is now. Don't get me wrong; I basically think this feature is a good one to have. Just a bit bigger than it was thought to be. ---------------------------------------- Feature #12944: Change Kernel#warn to call Warning.warn https://bugs.ruby-lang.org/issues/12944#change-62178 * Author: Jeremy Evans * Status: Open * Priority: Normal * Assignee: * Target version: 2.4 ---------------------------------------- Currently, Kernel#warn is basically the same as $stderr.puts. With the new Warning.warn support in ruby 2.4, it makes sense for Kernel#warn to call Warning.warn, otherwise you will not be able to use Warning.warn to filter/process warning messages generated by Kernel#warn. The Kernel#warn API is different than the Warning.warn API, the attached patch tries to get similar behavior, but there are probably corner cases where the behavior is different. ---Files-------------------------------- 0001-Change-Kernel-warn-to-call-Warning.warn.patch (1.88 KB) 0001-Change-Kernel-warn-to-call-Warning.warn.patch (1.89 KB) 0001-Change-Kernel-warn-to-call-Warning.warn.patch (2.36 KB) 0001-Change-Kernel-warn-to-call-Warning.warn.patch (2.3 KB) 0001-Change-Kernel-warn-to-call-Warning.warn.patch (3.23 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: