1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

warn should be a global function

This commit is contained in:
Nobuyoshi Nakada 2019-12-13 21:38:50 +09:00
parent a2e8712349
commit eb512c5a95
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -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