This help site has been deprecated. Please send your requests to support@rubygems.org

deprecation warnings when running bundle on ruby 2.7.3p183

Lannar's Avatar

Lannar

14 Oct, 2021 08:46 PM

I'm getting the following warning while running bundle for each gem installed on ruby 2.7.3p183 (Bundler version 2.2.19):
/usr/local/lib/ruby/site_ruby/2.7/rubygems/package.rb:509: warning: Using the last argument as keyword parameters is deprecated

its in this method:

  def load_spec(entry) # :nodoc:
    case entry.full_name
    when 'metadata' then
      @spec = Gem::Specification.from_yaml entry.read
    when 'metadata.gz' then
      args = [entry]
      args << { :external_encoding => Encoding::UTF_8 } if
        Zlib::GzipReader.method(:wrap).arity != 1
  
      Zlib::GzipReader.wrap(*args) do |gzio|
        @spec = Gem::Specification.from_yaml gzio.read
      end
    end
  end

whereas on a system that has 2.7.2p137 and Bundler version 2.1.4, I don't get this error because the method doesn't add in the arguments the same way:

  def load_spec(entry) # :nodoc:
    case entry.full_name
    when 'metadata' then
      @spec = Gem::Specification.from_yaml entry.read
    when 'metadata.gz' then
      Zlib::GzipReader.wrap(entry, external_encoding: Encoding::UTF_8) do |gzio|
        @spec = Gem::Specification.from_yaml gzio.read
      end
    end
  end

Please let me know if this is posted in the wrong place. Thanks in advance

Discussions are closed to public comments.
If you need help with RubyGems.org please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

03 Dec, 2021 11:06 AM
02 Dec, 2021 09:41 AM
16 Nov, 2021 07:55 AM
05 Nov, 2021 07:09 AM
03 Nov, 2021 07:18 PM