summaryrefslogtreecommitdiff
path: root/lib/rubygems/core_ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-13 21:38:50 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-13 21:38:50 +0900
commiteb512c5a9530322280991441954b0405cadeebf1 (patch)
tree6a0fd31f9fce3fd9a5cd61f37541128afc692f13 /lib/rubygems/core_ext
parenta2e87123499f6eef9c03089f61f174dd4b3cc673 (diff)
warn should be a global function
Diffstat (limited to 'lib/rubygems/core_ext')
-rw-r--r--lib/rubygems/core_ext/kernel_warn.rb4
1 files changed, 2 insertions, 2 deletions
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"
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"
kw[:uplevel] = uplevel
original_warn.call(*messages, **kw)
- end
+ }
end
end