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:
parent
26774351dc
commit
82cc2843a9
23 changed files with 393 additions and 142 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue