Merge RubyGems-3.3.19 and Bundler-2.3.19

This commit is contained in:
Hiroshi SHIBATA 2022-08-22 11:49:38 +09:00 committed by nagachika
parent 0918783347
commit 44c926f3a9
362 changed files with 7843 additions and 7605 deletions

View file

@ -5,8 +5,8 @@
# See LICENSE.txt for permissions.
#++
require_relative 'deprecate'
require_relative 'text'
require_relative "deprecate"
require_relative "text"
##
# Module that defines the default UserInteraction. Any class including this
@ -148,7 +148,7 @@ module Gem::UserInteraction
##
# Displays the given +statement+ on the standard output (or equivalent).
def say(statement = '')
def say(statement = "")
ui.say statement
end
@ -259,11 +259,11 @@ class Gem::StreamUI
default_answer = case default
when nil
'yn'
"yn"
when true
'Yn'
"Yn"
else
'yN'
"yN"
end
result = nil
@ -312,7 +312,7 @@ class Gem::StreamUI
def require_io_console
@require_io_console ||= begin
begin
require 'io/console'
require "io/console"
rescue LoadError
end
true
@ -472,7 +472,7 @@ class Gem::StreamUI
# and the +terminal_message+ when it is complete.
def initialize(out_stream, size, initial_message,
terminal_message = 'complete')
terminal_message = "complete")
@out = out_stream
@total = size
@count = 0
@ -616,18 +616,11 @@ class Gem::SilentUI < Gem::StreamUI
# The SilentUI has no arguments as it does not use any stream.
def initialize
reader, writer = nil, nil
reader = File.open(IO::NULL, 'r')
writer = File.open(IO::NULL, 'w')
super reader, writer, writer, false
io = NullIO.new
super io, io, io, false
end
def close
super
@ins.close
@outs.close
end
def download_reporter(*args) # :nodoc:
@ -637,4 +630,25 @@ class Gem::SilentUI < Gem::StreamUI
def progress_reporter(*args) # :nodoc:
SilentProgressReporter.new(@outs, *args)
end
##
# An absolutely silent IO.
class NullIO
def puts(*args)
end
def print(*args)
end
def flush
end
def gets(*args)
end
def tty?
false
end
end
end