ruby-changes:59234
From: Nobuyoshi <ko1@a...>
Date: Fri, 13 Dec 2019 21:41:35 +0900 (JST)
Subject: [ruby-changes:59234] eb512c5a95 (master): warn should be a global function
https://git.ruby-lang.org/ruby.git/commit/?id=eb512c5a95 From eb512c5a9530322280991441954b0405cadeebf1 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 13 Dec 2019 21:38:50 +0900 Subject: warn should be a global function diff --git a/lib/rubygems/core_ext/kernel_warn.rb b/lib/rubygems/core_ext/kernel_warn.rb index 6ea72b1..dfc577d 100644 --- a/lib/rubygems/core_ext/kernel_warn.rb +++ b/lib/rubygems/core_ext/kernel_warn.rb @@ -16,7 +16,7 @@ if RUBY_VERSION >= "2.5" https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_warn.rb#L16 end - define_method(:warn) do |*messages, **kw| + module_function define_method(:warn) {|*messages, **kw| unless uplevel = kw[:uplevel] if Gem.java_platform? return original_warn.call(*messages) @@ -50,6 +50,6 @@ if RUBY_VERSION >= "2.5" https://github.com/ruby/ruby/blob/trunk/lib/rubygems/core_ext/kernel_warn.rb#L50 kw[:uplevel] = uplevel original_warn.call(*messages, **kw) - end + } end end -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/