Commit graph

14659 commits

Author SHA1 Message Date
David Rodríguez
48410af53c [rubygems/rubygems] Fix a gem install crash during "done installing" hooks
It would happen when the gem is already installed to multiple GEM_PATHS.
RubyGems was removing duplicate specs without considering the
potentially different `base_dir`. That was causing the gem to be
misidentified as not already installed, and a nil specification getting
returned from the installer as a result, causing the crash.

Solve it by making sure `Gem::Specification.all` really iterates through
all the different specifications in all GEM_PATHs.

0d8c208f65
2024-10-09 10:07:11 +00:00
David Rodríguez
9f812522f5 [rubygems/rubygems] Allow gem pristine to reset default gems too
c9e665eb8a
2024-10-09 06:21:30 +00:00
David Rodríguez
73834f11fa [rubygems/rubygems] Fix Gem::Specification#gem_dir losing custom source for some reason
f8f589b1b8
2024-10-09 05:54:14 +00:00
David Rodríguez
83456d1e9a [rubygems/rubygems] Fix plugin command loading
The `LoadError` needs to be ignored because command may have been
defined and registered from a rubygems_plugin.rb file.

31f13d449b
2024-10-09 05:26:27 +00:00
John Bampton
3fc1495c30 Fix spelling 2024-10-09 07:14:44 +09:00
tomoya ishida
cb19dfca2c [ruby/irb] Change debug test workaround to use ENV
RUBY_DEBUG_TEST_UI
(https://github.com/ruby/irb/pull/1014)

9933584754
2024-10-08 15:15:43 +00:00
Hiroshi SHIBATA
638b4468b8 Call Resolv::DNS::Config#lazy_initialize explicitly if that instance is not initialized 2024-10-08 15:52:49 +09:00
David Rodríguez
a90861340a [rubygems/rubygems] Fix bundle.bat re-execution
It does not have ruby code, so we should not prepend `ruby` to the
command the re-execute it.

e04e00f7bb
2024-10-07 16:36:50 +00:00
Sam Bostock
c818606d84 [ruby/rdoc] Use normal font-weight for links
(https://github.com/ruby/rdoc/pull/1188)

b53f0cb2ed
2024-10-07 11:25:59 +00:00
tomoya ishida
0752fff215 [ruby/reline] Add cursor keys for application keypad mode to default
key bindings
(https://github.com/ruby/reline/pull/719)

* Add SS3 arrow sequence to default key bindings

* Remove wrong KDE arrow sequence

546a42522e
2024-10-07 00:37:33 +00:00
tomoya ishida
8f5abcb0c7 [ruby/reline] Allow utf-8 safe meta key mapping in inputrc
(https://github.com/ruby/reline/pull/723)

Readline's convert-meta setting is utf-8 unsafe.
Allow assigning `"\M-char": key` to bind "\echar": key even if convert-meta is not enabled.

9844b99c6e
2024-10-06 23:35:06 +00:00
tomoya ishida
98620f6c52 [ruby/irb] Change default completor from regexp to auto, try
TypeCompletor and fallback to RegexpCompletor.
(https://github.com/ruby/irb/pull/1010)

bb6a99d815
2024-10-06 11:10:12 +00:00
Samuel Giddins
dfa11551aa [rubygems/rubygems] More rubygems 3.2.x removals
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

272f3464a3
2024-10-04 20:01:52 +00:00
Samuel Giddins
7695bf183b [rubygems/rubygems] Remove CorrectHashForLambdaOperator monkey patch
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

085bafd8d4
2024-10-04 20:01:52 +00:00
Samuel Giddins
db6e6155d6 [rubygems/rubygems] Remove outdated conditionals from tests
Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

06eec6d855
2024-10-04 20:01:51 +00:00
Samuel Giddins
bdc3363d0f [rubygems/rubygems] Update required_ruby_version to 3.1
3.0 has been EOL since march, drop support for it before the 3.4 release is cut

Signed-off-by: Samuel Giddins <segiddins@segiddins.me>

fc1f03b06a
2024-10-04 20:01:51 +00:00
Earlopain
66124cdb17 [ruby/prism] Use partial_script for the parser translators
Followup to https://github.com/ruby/prism/pull/3079

68f434e356
2024-10-03 12:52:02 +00:00
tomoya ishida
218445bb1f [ruby/rdoc] Fix ToRdoc#accept_table
(https://github.com/ruby/rdoc/pull/1184)

7b68545094
2024-10-03 12:27:43 +00:00
Nobuyoshi Nakada
9d4af312bd [ruby/reline] Rename matches? as match?
(https://github.com/ruby/reline/pull/753)

9230fe162d
2024-10-03 10:38:38 +00:00
tompng
f7343b636f prettyprint hash with colon style 2024-10-03 18:47:09 +09:00
Sadiq Saif
1b3f18afce each_address should now resolve for AAAA first
AAAA over A is standards track behaviour as per RFC 6724.
2024-10-03 15:04:46 +09:00
David Rodríguez
e77346153d [rubygems/rubygems] Remove compatibility code with old RubyGems
f11e42a3c5
2024-10-02 21:33:02 +00:00
tomoya ishida
09761e4789 [ruby/reline] Fix incremental search cancel bug
(https://github.com/ruby/reline/pull/748)

bf0f8fa333
2024-10-02 17:47:02 +00:00
tomoya ishida
8f4277f405 [ruby/reline] Add a timeout to cursor_pos
(https://github.com/ruby/reline/pull/750)

dd4a654e5d
2024-10-02 17:36:35 +00:00
David Rodríguez
acbdb30941 [rubygems/rubygems] Fix error in one source when fetching dependency APIs clearing results from all sources
0549ddbcc5
2024-10-02 10:37:26 +00:00
David Rodríguez
5000138084
[rubygems/rubygems] Fix bundler/inline resetting ENV
72d8d4dbba
2024-10-02 14:34:55 +09:00
David Rodríguez
a3929a9ca1
[rubygems/rubygems] The BUNDLER_SETUP env should also be cleaned up
47b7e50f64
2024-10-02 14:34:55 +09:00
David Rodríguez
49483904d8
[rubygems/rubygems] Make sure MissingSpecVersionError#to_s prints exception message
Gem command loading errors rely on `#to_s` on the raised exception, but
in the case of `MissingSpecVersionError` that was only the exception
name, making it printed twice and no message at all.

Before:

```
ERROR:  Loading command: install (Gem::MissingSpecVersionError)
 	Gem::MissingSpecVersionError
```

After:

```
ERROR:  Loading command: install (Gem::MissingSpecVersionError)
	Could not find 'io-wait' (>= 0.a) - did find: [io-wait-0.3.0-java]
  Checked in 'GEM_PATH=/Users/deivid/Code/rubygems/rubygems/bundler/tmp/1.1/gems/system' , execute `gem env` for more information
```

d06944bb2f
2024-10-02 14:34:55 +09:00
David Rodríguez
02d50d9cb1
[rubygems/rubygems] Simplify command loading
95f60f0e60
2024-10-02 14:34:54 +09:00
Hiroshi SHIBATA
63f31a9ed5 [ruby/singleton] Fixed double assignment
9d3c77a868
2024-10-02 05:33:31 +00:00
tomoya ishida
a8a921aef3 [ruby/irb] Use correct binding in debug mode
(https://github.com/ruby/irb/pull/1007)

In debug command, IRB's context was using wrong binding.
Some code colorization, command detection failed because binding.local_variable returned wrong value.

68f718de21
2024-10-02 03:18:35 +00:00
tomoya ishida
e320da6097 [ruby/reline] Fix Reline crash with invalid encoding history
(https://github.com/ruby/reline/pull/751)

e9d4b37e34
2024-10-01 17:01:38 +00:00
rm155
0f00544984
[ruby/singleton] Make compatible with Ruby 2.4
0a77bb492d
2024-10-01 17:59:43 +09:00
rm155
2f53c9fc62
[ruby/singleton] Clean VERSION freezing
f31334a736
2024-10-01 17:59:42 +09:00
rm155
d0c1eef511
[ruby/singleton] Only use RactorLocalSingleton if Ractor is defined
f684d36a47
2024-10-01 17:59:42 +09:00
rm155
a6e96df573
[ruby/singleton] Change PerRactorSingleton to RactorLocalSingleton
1216a86303
2024-10-01 17:59:42 +09:00
rm155
136b30b414
[ruby/singleton] Improve Ractor-compliance; Create PerRactorSingleton
ec4f66d9c1
2024-10-01 17:59:42 +09:00
Earlopain
5ed67f4826 [ruby/rdoc] Only let browser search through source code until it's
expanded
(https://github.com/ruby/rdoc/pull/1181)

Something that's been bothering me is that while the source code is
not visible by default, the browser still jump to it when searching.
Adding the `visible` property prevents this.

Test it out yourself:
* `bundle exec rdoc`
* open `_site/index.html`
* Search for `NameError`

Before, you will get a match from `load_yaml` source code, after
you only get the match when that methods source code is expanded.

003126cc23
2024-09-30 11:32:45 +00:00
Hiroshi SHIBATA
8cd36a6dab
Don't warn the bundled gems that are migrated at Ruby 3.0.
We should stop warnings at some point. I decided to that period EOL-ed versions.
ex. In 2024, Ruby 3.0 is EOL. we removed webrick, rexml, rss from warning targets.
2024-09-30 18:53:21 +09:00
David Rodríguez
3a273c4742 [rubygems/rubygems] Fix error when changing a path source to a git source if frozen mode
4c79ab9b2e
2024-09-30 05:09:16 +00:00
Earlopain
7d318c2cb2 [rubygems/rubygems] Fix stub.activated? sometimes returning false after activation under bundler
Closes https://github.com/rubygems/rubygems/pull/8068

This issue only occurs if the underlying stub is a gem stub:
f56098d8a1/bundler/lib/bundler/stub_specification.rb (L109-L112)

9b0152b3d5
2024-09-30 05:08:48 +00:00
David Rodríguez
060932af98 [rubygems/rubygems] Fix old cache format detection when application is not source controlled
b2adcc0173
2024-09-30 05:08:25 +00:00
David Rodríguez
82f250af45 [rubygems/rubygems] gem cleanup no longer needs to reset paths
Since `Gem::Uninstaller` no longer changes paths either.

427059d45f
2024-09-30 05:07:58 +00:00
David Rodríguez
d4ac5c573b [rubygems/rubygems] Don't add duplicated specs to unresolved specs
This could happen when a regular gem shadows a default gem.

9ef70dd1f7
2024-09-30 05:07:57 +00:00
David Rodríguez
73d60df6e0 [rubygems/rubygems] Don't list duplicated version in Gem::Specification.reset warning
e6e3db821f
2024-09-30 05:07:57 +00:00
Hiroshi SHIBATA
3a9e48b9a4
Fixed warning condition with LoadError 2024-09-30 11:35:59 +09:00
Nobuyoshi Nakada
1f6d2e77d9
Remove leading spaces from LIBPATHFLAG and RPATHFLAG
Join with a space in `MakeMakefile#libpathflag` instead.
2024-09-29 23:07:16 +09:00
Ellen Marie Dash
47a3482a41 [rubygems/rubygems] Remove code that makes suggest_gems_from_name give worse results.
09ec67ffdf
2024-09-28 21:12:25 +00:00
David Rodríguez
d1324170b6 [rubygems/rubygems] Warning about PATH in --user-install mode is only necessary for gems with executables
2fe0f452a2
2024-09-27 16:49:32 +00:00
Stan Lo
098649bc59 [ruby/rdoc] Add home page link to output message
(https://github.com/ruby/rdoc/pull/1165)

The link is clickable in the terminal and opens the home page in the browser

b7d580afab
2024-09-27 13:58:36 +00:00