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

Prepare to release RubyGems 3.1.0 final version.

This commit is contained in:
Hiroshi SHIBATA 2019-12-13 20:19:08 +09:00
parent 26774351dc
commit 82cc2843a9
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2
23 changed files with 393 additions and 142 deletions

View file

@ -6,13 +6,17 @@ if RUBY_VERSION >= "2.5"
module Kernel
path = "#{__dir__}/" # Frames to be skipped start with this path.
# Suppress "method redefined" warning
original_warn = instance_method(:warn)
Module.new {define_method(:warn, original_warn)}
original_warn = method(:warn)
module_function define_method(:warn) {|*messages, **kw|
remove_method :warn
class << self
remove_method :warn
end
define_method(:warn) do |*messages, **kw|
unless uplevel = kw[:uplevel]
if Gem.java_platform?
return original_warn.call(*messages)
@ -46,6 +50,6 @@ if RUBY_VERSION >= "2.5"
kw[:uplevel] = uplevel
original_warn.call(*messages, **kw)
}
end
end
end