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:
parent
a2e8712349
commit
eb512c5a95
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue