Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pushing to rubygems with newer ruby
The issue is with the parsing of the credentials file, because we have some extra spaces in it that the new ruby yaml parser doesn't care for. Leading spaces also seem like invalid yaml to me, so this is more correct anyway. ``` irb(main):001> require 'rubygems/yaml_serializer' => true # No leading spaces before the rubygems api key irb(main):002> f = File.read('credentials') => "---\n:rubygems_api_key: \n\n" irb(main):003> Gem::YAMLSerializer.load(f) => {":rubygems_api_key"=>{}} # With leading spaces before the :rubygems_api_key irb(main):006> f = File.read('credentials') => "---\n :rubygems_api_key: \n\n" irb(main):007> Gem::YAMLSerializer.load(f) ruby/3.3.0/rubygems/yaml_serializer.rb:66:in `block in load': undefined method `[]=' for nil (NoMethodError) ```
- Loading branch information