Commit graph

12 commits

Author SHA1 Message Date
David Rodríguez
9e0eb9778d Merge RubyGems-3.6.2 and Bundler-2.6.2 2024-12-24 07:21:10 +09:00
Hiroshi SHIBATA
7d7a84e99f Merge RubyGems-3.5.3 and Bundler-2.5.3 2023-12-23 09:34:26 +09:00
Samuel Giddins
3fe2f2689f [rubygems/rubygems] Raise exception on unexpected EOF in marshal
Instead of NoMethodError being raised by accidentally trying to use nil

ac8f812bbf
2023-10-25 18:52:38 +00:00
Samuel Giddins
0a423d4c4e [rubygems/rubygems] Aggressively optimize allocations in SafeMarshal
Reduces allocations in a bundle install --full-index by an order of magnitude

Main wins are (a) getting rid of exessive string allocations for exception message stack

(b) Avoiding hash allocations caused by kwargs for #initialize

(c) avoid using unpack to do bit math, its easy enough to do by hand

(d) special case the most common elements so they can be read without an allocation

(e) avoid string allocations every time a symbol->string lookup is done by using symbol#name

7d2ee51402
2023-09-21 07:40:58 +00:00
Samuel Giddins
843c83ee5f [rubygems/rubygems] Give up, load Time via Marshal.load
6c92ba2ba3
2023-09-20 02:03:04 +00:00
Samuel Giddins
cadca9f67e [rubygems/rubygems] All rubies working with different time zones
Tested with:

`ruby -e 'trap("INT") { exit 1 }; TZ=%w[UTC +0000 -0000]; RUBY=%w[ruby-2.7 ruby-3.2.2 jruby-9.4 truffleruby-22 truffleruby-23]; TZ.product(RUBY).each { |t, r| puts ?**120, "TZ=#{t} RUBY=#{r}", "*"*120; system({"TZ"=>t,"RUBY"=>r}, *ARGV) }' zsh -lic 'chruby $RUBY; ruby -vw -Ilib test/rubygems/test_gem_safe_marshal.rb --verbose=progress'`

6192005afb
2023-09-20 02:03:03 +00:00
Samuel Giddins
c65c88e65c [rubygems/rubygems] Tests passing on truffleruby 22 in addition to 23
8065530d43
2023-09-20 02:03:03 +00:00
Samuel Giddins
e52f9bd41e [rubygems/rubygems] Bundler error handling
63b422b71a
2023-09-20 02:03:02 +00:00
Samuel Giddins
f0d1b0cc4b [rubygems/rubygems] Allow bundler to load from the dependency api
3303957286
2023-09-20 02:03:01 +00:00
Samuel Giddins
1fff3e44ff [rubygems/rubygems] Verified working on mri/jruby/truffleruby with specs on rubygems.org
4f51741cc6
2023-09-20 02:03:00 +00:00
Samuel Giddins
c80a4d453a [rubygems/rubygems] Fix UTC time loading
2a4d0a44b0
2023-09-20 02:02:58 +00:00
Samuel Giddins
d182d83ce9 [rubygems/rubygems] Add a Marshal.load replacement that walks an AST to safely load permitted classes/symbols
7e4478fe73
2023-09-20 02:02:58 +00:00