<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rubygems/gem_runner.rb, branch v4.0.4</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/rubygems] Removed unused deprecate loading</title>
<updated>2025-11-17T22:57:29+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-11-17T06:12:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=093dbbbd350cf1288c12287629db932faaab1b55'/>
<id>093dbbbd350cf1288c12287629db932faaab1b55</id>
<content type='text'>
https://github.com/ruby/rubygems/commit/a49d315ecd
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/ruby/rubygems/commit/a49d315ecd
</pre>
</div>
</content>
</entry>
<entry>
<title>Validate user input encoding</title>
<updated>2024-11-04T10:18:55+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-03-13T13:11:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=e7518a7859afdb8bb0745d084e59a82cb1dba4a5'/>
<id>e7518a7859afdb8bb0745d084e59a82cb1dba4a5</id>
<content type='text'>
If the user has the encoding of her system messed up, she may end up
sending us incorrectly encoding input, causing "invalid byte sequence in
UTF-8" errors at random places.

These errors can be forced on a system without encoding issues with
something like:

```
$ gem install$(echo -e "\xFF") foo
/Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:534:in `block in set_config_file_name': invalid byte sequence in UTF-8 (ArgumentError)
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `each'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `set_config_file_name'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:177:in `initialize'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `new'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `do_configuration'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:33:in `run'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/bin/gem:10:in `&lt;main&gt;'
```

This commit makes RubyGems print a better error in this case:

```
$ ruby -Ilib bin/gem install$(echo -e "\xFF") foo
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:75:in `validate_encoding': invalid argument: 'install�' has invalid encoding (Gem::OptionParser::InvalidArgument)
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:31:in `run'
	from bin/gem:10:in `&lt;main&gt;'
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the user has the encoding of her system messed up, she may end up
sending us incorrectly encoding input, causing "invalid byte sequence in
UTF-8" errors at random places.

These errors can be forced on a system without encoding issues with
something like:

```
$ gem install$(echo -e "\xFF") foo
/Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:534:in `block in set_config_file_name': invalid byte sequence in UTF-8 (ArgumentError)
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `each'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:530:in `set_config_file_name'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/config_file.rb:177:in `initialize'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `new'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:71:in `do_configuration'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/gem_runner.rb:33:in `run'
	from /Users/deivid/.asdf/installs/ruby/3.2.1/bin/gem:10:in `&lt;main&gt;'
```

This commit makes RubyGems print a better error in this case:

```
$ ruby -Ilib bin/gem install$(echo -e "\xFF") foo
/Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:75:in `validate_encoding': invalid argument: 'install�' has invalid encoding (Gem::OptionParser::InvalidArgument)
	from /Users/deivid/Code/rubygems/rubygems/lib/rubygems/gem_runner.rb:31:in `run'
	from bin/gem:10:in `&lt;main&gt;'
```
</pre>
</div>
</content>
</entry>
<entry>
<title>util/rubocop -A --only Layout/EmptyLineAfterMagicComment</title>
<updated>2023-03-23T08:18:49+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-03-17T09:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f24a86d83f07f214e97aa98da190cda55092805f'/>
<id>f24a86d83f07f214e97aa98da190cda55092805f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] util/rubocop -A --only Style/RescueStandardError</title>
<updated>2023-03-17T09:50:55+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-03-16T04:47:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=6ad269dc39ab6bdf7ef195a048fa10b642374826'/>
<id>6ad269dc39ab6bdf7ef195a048fa10b642374826</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/80b57da926
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/80b57da926
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] util/rubocop -A --only Style/RescueModifier</title>
<updated>2023-03-17T09:50:55+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-03-16T04:48:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=70164eec0f48a691dd039f55ac897036aa32e5cf'/>
<id>70164eec0f48a691dd039f55ac897036aa32e5cf</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/b490379eab
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/b490379eab
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems</title>
<updated>2023-03-16T01:59:11+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-03-15T09:06:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=760b8b7d2413670808499eb972abe61400fe6b46'/>
<id>760b8b7d2413670808499eb972abe61400fe6b46</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/d4938259c4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/d4938259c4
</pre>
</div>
</content>
</entry>
<entry>
<title>RubyGems: Enable Style/StringLiterals cop</title>
<updated>2022-07-22T03:07:23+00:00</updated>
<author>
<name>Takuya Noguchi</name>
<email>takninnovationresearch@gmail.com</email>
</author>
<published>2022-07-17T08:08:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=d7ffd3fea402239b16833cc434404a7af82d44f3'/>
<id>d7ffd3fea402239b16833cc434404a7af82d44f3</id>
<content type='text'>
Signed-off-by: Takuya Noguchi &lt;takninnovationresearch@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Takuya Noguchi &lt;takninnovationresearch@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge RubyGems and Bundler master</title>
<updated>2022-07-13T05:11:55+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2022-07-13T03:56:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=437a5ae9d6d60bd1972641167a98204007bd1c0b'/>
<id>437a5ae9d6d60bd1972641167a98204007bd1c0b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Normalize end alignment style with Bundler</title>
<updated>2022-01-19T02:20:36+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2022-01-17T14:16:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=f04954d95c8a729d70be1c883617534a2e7cc239'/>
<id>f04954d95c8a729d70be1c883617534a2e7cc239</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/f7f504b24c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/f7f504b24c
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Prefer `require_relative` to `require` for internal requires</title>
<updated>2021-08-31T10:06:14+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2019-04-22T11:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54ae3f587ed42f425edc7ec741702ac764429c5d'/>
<id>54ae3f587ed42f425edc7ec741702ac764429c5d</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/c74fc58695
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/c74fc58695
</pre>
</div>
</content>
</entry>
</feed>
