Stan Lo
7c226291d3
[ruby/reline] Remove Timeout usage
...
(https://github.com/ruby/reline/pull/580 )
Timeout's implementation relies on Thread, which would conflict with
`ruby/debug`'s thread-freezing implementation and has casued issues like
- ruby/debug#877
- ruby/debug#934
- ruby/debug#1000
This commit avoids the issue by completely removing the use of Timeout.
https://github.com/ruby/reline/commit/d4f0cd3fe1
2023-08-20 10:40:55 +00:00
Josh Nichols
3544200513
[rubygems/rubygems] fix lint
...
https://github.com/rubygems/rubygems/commit/75c0f27b7e
2023-08-20 09:07:11 +00:00
Josh Nichols
7c4431e61c
[rubygems/rubygems] use a one-liner
...
https://github.com/rubygems/rubygems/commit/46745885e8
2023-08-20 09:07:05 +00:00
Josh Nichols
e5efa01c7d
[rubygems/rubygems] handle removing `BUNDLE_`, since using start_with? would still include that
...
https://github.com/rubygems/rubygems/commit/235d9b38d8
2023-08-20 09:07:00 +00:00
Martin Emde
f0bf9391dc
[rubygems/rubygems] Don't rely on globals when not matching regexp for "local."
...
https://github.com/rubygems/rubygems/commit/e79ccdafd8
2023-08-20 09:06:54 +00:00
Josh Nichols
b5a0630cd0
[rubygems/rubygems] Use ! methods once we have a new copy of the string. Use .prepend to avoid allocating a new string.
...
https://github.com/rubygems/rubygems/commit/2ac35a661f
2023-08-20 09:06:48 +00:00
Josh Nichols
29aab66e6b
[rubygems/rubygems] call key.to_s once instead of multiple times to save when it's a symbol
...
https://github.com/rubygems/rubygems/commit/535feb817c
2023-08-20 09:06:43 +00:00
Josh Nichols
239e35254b
[rubygems/rubygems] Use value.match? only on Strings, which avoids allocating a matchdata, which is not used
...
https://github.com/rubygems/rubygems/commit/cbf9ac93d7
2023-08-20 09:06:36 +00:00
Josh Nichols
598048e3dd
[rubygems/rubygems] Use .to_s once in the beginning to save allocations if it's a symbol.
...
https://github.com/rubygems/rubygems/commit/f8167db8a2
2023-08-20 09:06:31 +00:00
Josh Nichols
e921efa476
[rubygems/rubygems] name is often a symbol, so only to_s once to avoid allocating it multiple times
...
https://github.com/rubygems/rubygems/commit/8eac49c429
2023-08-20 09:06:25 +00:00
Josh Nichols
7cb6cbee95
[rubygems/rubygems] String#start_with? is faster than regex with beginning boundaries
...
https://github.com/rubygems/rubygems/commit/d7cde68034
2023-08-20 09:06:19 +00:00
Josh Nichols
b97e45d01a
[rubygems/rubygems] Use ! methods on the array, since it is brand new. The individual keys are also new, so we can use ! methods on each individual one as well.
...
https://github.com/rubygems/rubygems/commit/f2e912b9bb
2023-08-20 09:06:12 +00:00
Josh Nichols
2a61e1dccc
[rubygems/rubygems] Use Array#union to join these, instead of with | multiple times. This saves allocating 2 arrays
...
https://github.com/rubygems/rubygems/commit/48c03b33b7
2023-08-20 09:06:07 +00:00
Josh Nichols
79b187a45e
[rubygems/rubygems] config is a new Hash, and config.values is a new Array. that means we can use bang methods to avoid allocating new copies
...
https://github.com/rubygems/rubygems/commit/8bc13fa55f
2023-08-20 09:06:01 +00:00
Josh Nichols
921c2bba4e
[rubygems/rubygems] ENV.to_h returns a new hash, so we can `select!` it to avoid allocating another hash.
...
`String#start_with?` is faster than regex that is bound to the start of
a string.
https://github.com/rubygems/rubygems/commit/9b2006ef09
2023-08-20 09:05:56 +00:00
Samuel Giddins
7e5c3ec5b1
Update specification.rb
...
Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
2023-08-20 09:05:29 +00:00
Samuel Giddins
1935433f5f
[rubygems/rubygems] Ensure that loading multiple gemspecs with legacy YAML class references does not warn
...
Before this, you would get constant redefinition warnings on Psych::DefaultKey
Additionally, ensure the retries wont continue infinitely in the case of the ArgumentError not being caused by Marshal trying to load the undefined classes
https://github.com/rubygems/rubygems/commit/919e8c2de4
2023-08-20 09:05:17 +00:00
Akira Matsuda
f69f775f24
[rubygems/rubygems] choose_from_list may return nil index since
...
https://github.com/rubygems/rubygems/commit/abacb0cb34cd
https://github.com/rubygems/rubygems/commit/5e2e9d6e50
2023-08-20 09:04:38 +00:00
Kevin Newton
bd440bf85d
[ruby/yarp] Bump to version 0.8.0
...
https://github.com/ruby/yarp/commit/bfde753702
2023-08-19 01:14:10 +00:00
Ngan Pham
3d7a030112
[rubygems/rubygems] Resolve ruby version file relative to bundle root
...
This is a follow up to https://github.com/rubygems/rubygems/issues/6742 .
This change makes it so that the version file is resolved relative to
the Bundle root instead of the working directory.
Why is this useful?
If you run a commnad (eg `rails`) from the `app/` directory, your bundle
would fail to load.
https://github.com/rubygems/rubygems/commit/6d47ee98b9
2023-08-18 19:14:14 +00:00
John Hong
744bc4d5d0
[rubygems/rubygems] Make nil a valid license spec
...
https://github.com/rubygems/rubygems/commit/675effb67e
2023-08-18 16:42:49 +00:00
License Update
20106fe227
[rubygems/rubygems] Update SPDX license list as of 2023-06-18
...
https://github.com/rubygems/rubygems/commit/3db9165335
2023-08-18 08:21:13 +00:00
Kevin Newton
995fd11bde
[ruby/yarp] Remove strange :"#arg_rest" local
...
https://github.com/ruby/yarp/commit/66ecec218d
2023-08-18 00:06:57 +00:00
Martin Emde
e913431687
[rubygems/rubygems] Raise Gem::Package::FormatError on EOF, indicating corrupt gem
...
Gem::Package::TarReader::Entry now raises EOFError or returns nil
appropriately based on Ruby core IO.read and IO.readpartial behavior.
Zlib will respond accordingly by raising Zlib::GzipFile::Error on EOF.
When verifying a gem or extracting contents, raise FormatError similar
to other cases of corrupt gems.
Addresses a bug where Gem::Package would attempt to call size on nil
instead of raising a more descriptive and useful error, leading users
to assume the problem is internal to rubygems.
Remove unused error class TarReader::UnexpectedEOF that was never raised
since the NoMethodError on nil would happen first. Use EOFError instead.
https://github.com/rubygems/rubygems/commit/dc6129644b
2023-08-17 23:16:57 +00:00
Takashi Kokubun
67b5f63e97
Render YARP templates in the build process ( #8228 )
2023-08-17 14:39:04 -07:00
Kevin Newton
81d715099c
[ruby/yarp] Treat yp_buffer_t as an opaque pointer
...
Right now, we have to keep the buffer FFI object in sync with the
definition of yp_buffer_t because we access its fields directly. If
we add more fields or change the order, things will get out of sync.
Instead, let's treat yp_buffer_t as an opaque pointer and access
its fields through accessor functions directly. This is more
consistent with how we handle strings anyway.
https://github.com/ruby/yarp/commit/878d845eff
2023-08-17 09:58:56 -07:00
Ngan Pham
75a4767525
[rubygems/rubygems] Add `file` option to `ruby` method in Gemfile
...
https://github.com/rubygems/rubygems/commit/fb9354b7bf
2023-08-17 16:07:54 +00:00
Manu
7433c8f7dd
[rubygems/rubygems] Clarify that `bundle info` takes a gem name
...
https://github.com/rubygems/rubygems/commit/09ef74ef73
2023-08-17 10:39:31 +00:00
Takashi Kokubun
3873b1eb39
Resync YARP
2023-08-16 17:47:32 -07:00
Benoit Daloze
3536cad902
[ruby/yarp] Fixes so `bundle exec rake` can run on JRuby and TruffleRuby
...
https://github.com/ruby/yarp/commit/e6cea4fa08
2023-08-16 17:47:32 -07:00
Kevin Newton
ecf2e84c05
[ruby/yarp] Add a CHANGELOG
...
https://github.com/ruby/yarp/commit/b490ff0919
2023-08-16 17:47:32 -07:00
Kevin Newton
820a58c228
[ruby/yarp] Hide debug methods
...
https://github.com/ruby/yarp/commit/aa0dc2f301
2023-08-16 17:47:32 -07:00
Kevin Newton
3d032cf3e8
[ruby/yarp] Simplify creation of numerics
...
https://github.com/ruby/yarp/commit/e5f6ffa23a
2023-08-16 17:47:32 -07:00
Mike Dalessio
0f8091947d
[ruby/yarp] Move the gem's C extension into lib/yarp/
...
and change the require from "yarp.so" to "yarp/yarp", which is more
aligned with existing community conventions for gems.
https://github.com/ruby/yarp/commit/64b70e2658
2023-08-16 17:47:32 -07:00
Stan Lo
5a40f7db54
[ruby/irb] Encapsulate input details in Statement objects
...
(https://github.com/ruby/irb/pull/682 )
* Introduce Statement class
* Split Statement class for better clarity
https://github.com/ruby/irb/commit/65e8e68690
2023-08-16 10:13:46 +00:00
David Rodríguez
fe240b672b
[rubygems/rubygems] Show better error when PAT can't authenticate to a private server
...
Before:
```
Fetching gem metadata from https://rubygems.org/ ........
Fetching source index from https://rubygems.pkg.github.com/my-org/
Bad username or password for https://x-access-token@rubygems.pkg.github.com/my-org/ .
Please double-check your credentials and correct them.
```
After:
```
Fetching gem metadata from https://rubygems.org/ ........
Fetching source index from https://rubygems.pkg.github.com/my-org/
Access token could not be authenticated for https://x-access-token@rubygems.pkg.github.com/my-org/ .
Make sure it's valid and has the necessary scopes configured.
```
https://github.com/rubygems/rubygems/commit/2ae69c964a
2023-08-16 15:03:38 +09:00
David Rodríguez
e678affe70
[rubygems/rubygems] Bad auth should not fallback either
...
https://github.com/rubygems/rubygems/commit/ba3ea27869
2023-08-16 15:03:38 +09:00
David Rodríguez
2e04336b67
[rubygems/rubygems] Fix git source conservativeness
...
https://github.com/rubygems/rubygems/commit/9a0e0dfd5b
2023-08-16 15:03:38 +09:00
David Rodríguez
4a3777bf6b
[rubygems/rubygems] Extract s.name to a variable
...
https://github.com/rubygems/rubygems/commit/689c39b42f
2023-08-16 15:03:38 +09:00
David Rodríguez
e92ace6be7
[rubygems/rubygems] Remove unneeded stuff
...
This should be only for path sources, and unrelated to git.
https://github.com/rubygems/rubygems/commit/0d8f31eeed
2023-08-16 15:03:38 +09:00
David Rodríguez
7bb3e637ff
[rubygems/rubygems] Don't update locked sources when not necessary
...
https://github.com/rubygems/rubygems/commit/cfc82b592a
2023-08-16 15:03:38 +09:00
David Rodríguez
c57ab646cb
[rubygems/rubygems] Extract a `default_source` method
...
https://github.com/rubygems/rubygems/commit/784e08348e
2023-08-16 15:03:38 +09:00
David Rodríguez
002165f8fe
[rubygems/rubygems] Move `lockfile_source` variable out of condition branch
...
https://github.com/rubygems/rubygems/commit/efebc64250
2023-08-16 15:03:38 +09:00
David Rodríguez
6bc63ab9bb
[rubygems/rubygems] Refactor locked dep filtering more
...
We only need to check whether the spec if for a direct dependency once.
https://github.com/rubygems/rubygems/commit/65b455a5cb
2023-08-16 15:03:38 +09:00
David Rodríguez
86492fca65
[rubygems/rubygems] Avoid unnecessary loop through dependencies
...
https://github.com/rubygems/rubygems/commit/2ab63bb94d
2023-08-16 15:03:38 +09:00
Josh Nichols
af67ced3b0
[ruby/net-http] Update lib/net/http.rb
...
@natematykiewicz's suggestion to avoid another string allocation
https://github.com/ruby/net-http/commit/4a22c42338
Co-authored-by: Nate Matykiewicz <natematykiewicz@gmail.com>
2023-08-16 01:40:13 +00:00
Josh Nichols
ae68a8df58
[ruby/net-http] Update lib/net/http/response.rb
...
@natematykiewicz's suggestion to avoid a string allocation
https://github.com/ruby/net-http/commit/925630f227
Co-authored-by: Nate Matykiewicz <natematykiewicz@gmail.com>
2023-08-16 01:40:12 +00:00
Josh Nichols
ea321a654d
[ruby/net-http] use +'' everywhere
...
https://github.com/ruby/net-http/commit/1077427152
2023-08-16 01:40:11 +00:00
Josh Nichols
70da92cdf7
[ruby/net-http] Fix on 2.7
...
https://github.com/ruby/net-http/commit/5194fd541e
2023-08-16 01:40:10 +00:00
Josh Nichols
4d21134f3f
[ruby/net-http] freeze rest of lib
...
https://github.com/ruby/net-http/commit/455a74734a
2023-08-16 01:40:09 +00:00