rubygems-update 4.0.9 → 4.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83f0e21ae1b782d7223eeef031d3e934a1418acd8c25d45f57ab1aaae1974399
4
- data.tar.gz: 1a2f70f09a5f83ade52b6b414566d155058ac7143a86e1c52f1fe72caf1b738f
3
+ metadata.gz: 7a9117477d9e6ddfaa7f3478376ed88b6464d6bd63a554b29441558503083670
4
+ data.tar.gz: d7dba7c5e4583655d714c65b38597795957b7cb9c4e821bb5c112936b6ff2aac
5
5
  SHA512:
6
- metadata.gz: 1fdb7b4a286c354a34e07f4226019fd0bb20eed57bb5cec941096d1263fde3fcd116c26206021b954a27477f329d324cfeb868462625c67131c3fae023ebbedd
7
- data.tar.gz: 02ad6fca35638236ffee0c971d15702a33ec632998c88af3dc914b612f2bee1a7e191405dbbe2376ccbbc1b020bf6a692dd3c1ff81cf4c582190e2d523f4ae8c
6
+ metadata.gz: e0a646de842bc30f9c55c6029a413aa192a4059df7aa3fcad9cc3a419315ee32b4d9a615eb9c5c71aa3c8633fa5d342e69b8b7665fdbbab43900a71cb439ee9a
7
+ data.tar.gz: 2697587a8c24d46b27d80c2b65fa01874ef3b20fe22897cb93a2f406c74a941b010de1fd95c008c7f05ad11d93a23fb88cfa3208fec8c5c391fbedcb6264e92b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.10 / 2026-04-08
4
+
5
+ ### Enhancements:
6
+
7
+ * Ignore warnings with spec different platforms. Pull request [#8508](https://github.com/ruby/rubygems/pull/8508) by hsbt
8
+ * Better algorithm for sorting gem version. Pull request [#9421](https://github.com/ruby/rubygems/pull/9421) by Edouard-chin
9
+ * Update SPDX license list as of 2026-02-20. Pull request [#9434](https://github.com/ruby/rubygems/pull/9434) by hsbt
10
+ * Installs bundler 4.0.10 as a default gem.
11
+
12
+ ### Bug fixes:
13
+
14
+ * Register native extension files in default spec map. Pull request [#9431](https://github.com/ruby/rubygems/pull/9431) by hsbt
15
+ * Fix NoMethodError in Gem.try_activate when activation conflicts occur. Pull request [#9404](https://github.com/ruby/rubygems/pull/9404) by hsbt
16
+
3
17
  ## 4.0.9 / 2026-03-25
4
18
 
5
19
  ### Enhancements:
data/bundler/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.10 / 2026-04-08
4
+
5
+ ### Enhancements:
6
+
7
+ * Ignore warnings with spec different platforms. Pull request [#8508](https://github.com/ruby/rubygems/pull/8508) by hsbt
8
+ * Improve error message when current platform is not in lockfile. Pull request [#9439](https://github.com/ruby/rubygems/pull/9439) by 55728
9
+ * Cache package version selection. Pull request [#9410](https://github.com/ruby/rubygems/pull/9410) by Edouard-chin
10
+ * Check happy path first when comparing gem version. Pull request [#9417](https://github.com/ruby/rubygems/pull/9417) by Edouard-chin
11
+ * [feature] default_cli_command for config what command bundler runs when no specific command is provided. Pull request [#8886](https://github.com/ruby/rubygems/pull/8886) by jonbarlo
12
+ * Introduce a fast path for comparing Gem::Version. Pull request [#9414](https://github.com/ruby/rubygems/pull/9414) by Edouard-chin
13
+
14
+ ### Bug fixes:
15
+
16
+ * Restore rb_sys dependency for Rust. Pull request [#9416](https://github.com/ruby/rubygems/pull/9416) by bangseongbeom
17
+
3
18
  ## 4.0.9 / 2026-03-25
4
19
 
5
20
  ### Enhancements:
@@ -5,7 +5,7 @@ module Bundler
5
5
  module BuildMetadata
6
6
  # begin ivars
7
7
  @built_at = nil
8
- @git_commit_sha = "3ce4a32411".freeze
8
+ @git_commit_sha = "1c1d885018".freeze
9
9
  # end ivars
10
10
 
11
11
  # A hash representation of the build metadata.
@@ -80,11 +80,10 @@ module Bundler
80
80
  def conservative_version(spec)
81
81
  version = spec.version
82
82
  return ">= 0" if version.nil?
83
- segments = version.segments
84
83
  seg_end_index = version >= Gem::Version.new("1.0") ? 1 : 2
85
84
 
86
85
  prerelease_suffix = version.to_s.delete_prefix(version.release.to_s) if version.prerelease?
87
- "#{version_prefix}#{segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
86
+ "#{version_prefix}#{version.segments[0..seg_end_index].join(".")}#{prerelease_suffix}"
88
87
  end
89
88
 
90
89
  def version_prefix
@@ -5,6 +5,7 @@ module Bundler
5
5
  class Strategy
6
6
  def initialize(source)
7
7
  @source = source
8
+ @package_priority_cache = {}
8
9
  end
9
10
 
10
11
  def next_package_and_version(unsatisfied)
@@ -17,10 +18,12 @@ module Bundler
17
18
 
18
19
  def next_term_to_try_from(unsatisfied)
19
20
  unsatisfied.min_by do |package, range|
20
- matching_versions = @source.versions_for(package, range)
21
- higher_versions = @source.versions_for(package, range.upper_invert)
21
+ @package_priority_cache[[package, range]] ||= begin
22
+ matching_versions = @source.versions_for(package, range)
23
+ higher_versions = @source.versions_for(package, range.upper_invert)
22
24
 
23
- [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
25
+ [matching_versions.count <= 1 ? 0 : 1, higher_versions.count]
26
+ end
24
27
  end
25
28
  end
26
29
 
@@ -353,9 +353,27 @@ module Bundler
353
353
  message << "\n#{other_specs_matching_message(specs, matching_part)}"
354
354
  end
355
355
 
356
+ if specs_matching_requirement.any? && (hint = platform_mismatch_hint)
357
+ message << "\n\n#{hint}"
358
+ end
359
+
356
360
  raise GemNotFound, message
357
361
  end
358
362
 
363
+ def platform_mismatch_hint
364
+ locked_platforms = Bundler.locked_gems&.platforms
365
+ return unless locked_platforms
366
+
367
+ local_platform = Bundler.local_platform
368
+ return if locked_platforms.include?(local_platform)
369
+ return if locked_platforms.any? {|p| p == Gem::Platform::RUBY }
370
+
371
+ "Your current platform (#{local_platform}) is not included in the lockfile's platforms (#{locked_platforms.join(", ")}). " \
372
+ "Add the current platform to the lockfile with\n`bundle lock --add-platform #{local_platform}` and try again."
373
+ rescue GemfileNotFound
374
+ nil
375
+ end
376
+
359
377
  def filtered_versions_for(package)
360
378
  @gem_version_promoter.filter_versions(package, @all_versions[package])
361
379
  end
@@ -74,6 +74,13 @@ module Bundler
74
74
  fail!(key, value, "`#{other_key}` is current set to #{other_setting.inspect}", "the `#{conflicting.join("`, `")}` groups conflict")
75
75
  end
76
76
  end
77
+
78
+ rule %w[default_cli_command], "default_cli_command must be either 'install' or 'cli_help'" do |key, value, _settings|
79
+ valid_values = %w[install cli_help]
80
+ if !value.nil? && !valid_values.include?(value.to_s)
81
+ fail!(key, value, "must be one of: #{valid_values.join(", ")}")
82
+ end
83
+ end
77
84
  end
78
85
  end
79
86
  end
@@ -59,6 +59,7 @@ module Bundler
59
59
  bin
60
60
  cache_path
61
61
  console
62
+ default_cli_command
62
63
  gem.ci
63
64
  gem.github_username
64
65
  gem.linter
@@ -52,6 +52,7 @@ module Bundler
52
52
 
53
53
  # This is defined directly to avoid having to loading the full spec
54
54
  def missing_extensions?
55
+ return false if RUBY_ENGINE == "jruby"
55
56
  return false if default_gem?
56
57
  return false if extensions.empty?
57
58
  return false if File.exist? gem_build_complete_path
@@ -40,6 +40,9 @@ Gem::Specification.new do |spec|
40
40
 
41
41
  # Uncomment to register a new dependency of your gem
42
42
  # spec.add_dependency "example-gem", "~> 1.0"
43
+ <%- if config[:ext] == 'rust' -%>
44
+ spec.add_dependency "rb_sys", "~> 0.9.91"
45
+ <%- end -%>
43
46
  <%- if config[:ext] == 'go' -%>
44
47
  spec.add_dependency "go_gem", "~> 0.2"
45
48
  <%- end -%>
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Bundler
4
- VERSION = "4.0.9".freeze
4
+ VERSION = "4.0.10".freeze
5
5
 
6
6
  def self.bundler_major_version
7
7
  @bundler_major_version ||= gem_version.segments.first
data/doc/MAINTAINERS.txt CHANGED
@@ -1 +1,7 @@
1
1
  SHIBATA Hiroshi <hsbt@ruby-lang.org> (@hsbt)
2
+ Aaron Patterson <tenderlove@ruby-lang.org> (@tenderlove)
3
+ Sutou Kouhei <kou@clear-code.com> (@kou)
4
+ Colby Swandale <colby@rubygems.org> (@colby-swandale)
5
+ Eileen Uchitelle <eileencodes@gmail.com> (@eileencodes)
6
+ Mike Dalessio <mike.dalessio@gmail.com> (@flavorjones)
7
+ Edouard Chin <chin.edouard@gmail.com> (@Edouard-chin)
@@ -132,6 +132,11 @@ extensions will be restored.
132
132
  specs = specs.select {|spec| spec.platform == RUBY_ENGINE || Gem::Platform.local === spec.platform || spec.platform == Gem::Platform::RUBY }
133
133
 
134
134
  if specs.to_a.empty?
135
+ if options[:only_missing_extensions]
136
+ say "No gems with missing extensions to restore"
137
+ return
138
+ end
139
+
135
140
  raise Gem::Exception,
136
141
  "Failed to find gems #{options[:args]} #{options[:version]}"
137
142
  end
@@ -552,6 +552,15 @@ EOM
552
552
  tar = Gem::Package::TarReader.new gzio
553
553
 
554
554
  yield tar
555
+ ensure
556
+ # Consume remaining gzip data to prevent the
557
+ # "attempt to close unfinished zstream; reset forced" warning
558
+ # when the GzipReader is closed with unconsumed compressed data.
559
+ begin
560
+ IO.copy_stream(gzio, IO::NULL)
561
+ rescue Zlib::GzipFile::Error, IOError
562
+ nil
563
+ end
555
564
  end
556
565
  end
557
566
 
@@ -2071,6 +2071,7 @@ class Gem::Specification < Gem::BasicSpecification
2071
2071
  # probably want to build_extensions
2072
2072
 
2073
2073
  def missing_extensions?
2074
+ return false if RUBY_ENGINE == "jruby"
2074
2075
  return false if extensions.empty?
2075
2076
  return false if default_gem?
2076
2077
  return false if File.exist? gem_build_complete_path
@@ -140,6 +140,7 @@ class Gem::StubSpecification < Gem::BasicSpecification
140
140
  end
141
141
 
142
142
  def missing_extensions?
143
+ return false if RUBY_ENGINE == "jruby"
143
144
  return false if default_gem?
144
145
  return false if extensions.empty?
145
146
  return false if File.exist? gem_build_complete_path
@@ -27,6 +27,7 @@ class Gem::Licenses
27
27
  AGPL-1.0-or-later
28
28
  AGPL-3.0-only
29
29
  AGPL-3.0-or-later
30
+ ALGLIB-Documentation
30
31
  AMD-newlib
31
32
  AMDPLPA
32
33
  AML
@@ -48,6 +49,7 @@ class Gem::Licenses
48
49
  Adobe-Display-PostScript
49
50
  Adobe-Glyph
50
51
  Adobe-Utopia
52
+ Advanced-Cryptics-Dictionary
51
53
  Afmparse
52
54
  Aladdin
53
55
  Apache-1.0
@@ -61,6 +63,7 @@ class Gem::Licenses
61
63
  Artistic-2.0
62
64
  Artistic-dist
63
65
  Aspell-RU
66
+ BOLA-1.1
64
67
  BSD-1-Clause
65
68
  BSD-2-Clause
66
69
  BSD-2-Clause-Darwin
@@ -80,6 +83,7 @@ class Gem::Licenses
80
83
  BSD-3-Clause-No-Nuclear-Warranty
81
84
  BSD-3-Clause-Open-MPI
82
85
  BSD-3-Clause-Sun
86
+ BSD-3-Clause-Tso
83
87
  BSD-3-Clause-acpica
84
88
  BSD-3-Clause-flex
85
89
  BSD-4-Clause
@@ -90,6 +94,7 @@ class Gem::Licenses
90
94
  BSD-Advertising-Acknowledgement
91
95
  BSD-Attribution-HPND-disclaimer
92
96
  BSD-Inferno-Nettverk
97
+ BSD-Mark-Modifications
93
98
  BSD-Protection
94
99
  BSD-Source-Code
95
100
  BSD-Source-beginning-file
@@ -111,9 +116,11 @@ class Gem::Licenses
111
116
  Borceux
112
117
  Brian-Gladman-2-Clause
113
118
  Brian-Gladman-3-Clause
119
+ Buddy
114
120
  C-UDA-1.0
115
121
  CAL-1.0
116
122
  CAL-1.0-Combined-Work-Exception
123
+ CAPEC-tou
117
124
  CATOSL-1.1
118
125
  CC-BY-1.0
119
126
  CC-BY-2.0
@@ -231,6 +238,9 @@ class Gem::Licenses
231
238
  EPICS
232
239
  EPL-1.0
233
240
  EPL-2.0
241
+ ESA-PL-permissive-2.4
242
+ ESA-PL-strong-copyleft-2.4
243
+ ESA-PL-weak-copyleft-2.4
234
244
  EUDatagrid
235
245
  EUPL-1.0
236
246
  EUPL-1.1
@@ -304,6 +314,7 @@ class Gem::Licenses
304
314
  HPND-Markus-Kuhn
305
315
  HPND-Netrek
306
316
  HPND-Pbmplus
317
+ HPND-SMC
307
318
  HPND-UC
308
319
  HPND-UC-export-US
309
320
  HPND-doc
@@ -318,6 +329,7 @@ class Gem::Licenses
318
329
  HPND-sell-variant
319
330
  HPND-sell-variant-MIT-disclaimer
320
331
  HPND-sell-variant-MIT-disclaimer-rev
332
+ HPND-sell-variant-critical-systems
321
333
  HTMLTIDY
322
334
  HaskellReport
323
335
  Hippocratic-2.1
@@ -330,6 +342,7 @@ class Gem::Licenses
330
342
  IPL-1.0
331
343
  ISC
332
344
  ISC-Veillard
345
+ ISO-permission
333
346
  ImageMagick
334
347
  Imlib2
335
348
  Info-ZIP
@@ -387,6 +400,7 @@ class Gem::Licenses
387
400
  MIT-Festival
388
401
  MIT-Khronos-old
389
402
  MIT-Modern-Variant
403
+ MIT-STK
390
404
  MIT-Wu
391
405
  MIT-advertising
392
406
  MIT-enna
@@ -395,6 +409,7 @@ class Gem::Licenses
395
409
  MIT-testregex
396
410
  MITNFA
397
411
  MMIXware
412
+ MMPL-1.0.1
398
413
  MPEG-SSG
399
414
  MPL-1.0
400
415
  MPL-1.1
@@ -426,6 +441,7 @@ class Gem::Licenses
426
441
  NGPL
427
442
  NICTA-1.0
428
443
  NIST-PD
444
+ NIST-PD-TNT
429
445
  NIST-PD-fallback
430
446
  NIST-Software
431
447
  NLOD-1.0
@@ -485,12 +501,15 @@ class Gem::Licenses
485
501
  OPL-1.0
486
502
  OPL-UK-3.0
487
503
  OPUBL-1.0
504
+ OSC-1.0
488
505
  OSET-PL-2.1
489
506
  OSL-1.0
490
507
  OSL-1.1
491
508
  OSL-2.0
492
509
  OSL-2.1
493
510
  OSL-3.0
511
+ OSSP
512
+ OpenMDW-1.0
494
513
  OpenPBS-2.3
495
514
  OpenSSL
496
515
  OpenSSL-standalone
@@ -501,6 +520,7 @@ class Gem::Licenses
501
520
  PHP-3.01
502
521
  PPL
503
522
  PSF-2.0
523
+ ParaType-Free-Font-1.3
504
524
  Parity-6.0.0
505
525
  Parity-7.0.0
506
526
  Pixar
@@ -529,6 +549,7 @@ class Gem::Licenses
529
549
  SGI-B-1.1
530
550
  SGI-B-2.0
531
551
  SGI-OpenGL
552
+ SGMLUG-PM
532
553
  SGP4
533
554
  SHL-0.5
534
555
  SHL-0.51
@@ -576,6 +597,7 @@ class Gem::Licenses
576
597
  TTYP0
577
598
  TU-Berlin-1.0
578
599
  TU-Berlin-2.0
600
+ TekHVC
579
601
  TermReadKey
580
602
  ThirdEye
581
603
  TrustedQSL
@@ -585,6 +607,7 @@ class Gem::Licenses
585
607
  UPL-1.0
586
608
  URT-RLE
587
609
  Ubuntu-font-1.0
610
+ UnRAR
588
611
  Unicode-3.0
589
612
  Unicode-DFS-2015
590
613
  Unicode-DFS-2016
@@ -596,15 +619,19 @@ class Gem::Licenses
596
619
  VOSTROM
597
620
  VSL-1.0
598
621
  Vim
622
+ Vixie-Cron
599
623
  W3C
600
624
  W3C-19980720
601
625
  W3C-20150513
626
+ WTFNMFPL
602
627
  WTFPL
603
628
  Watcom-1.0
604
629
  Widget-Workshop
630
+ WordNet
605
631
  Wsuipa
606
632
  X11
607
633
  X11-distribute-modifications-variant
634
+ X11-no-permit-persons
608
635
  X11-swapped
609
636
  XFree86-1.1
610
637
  XSkat
@@ -645,6 +672,7 @@ class Gem::Licenses
645
672
  gnuplot
646
673
  gtkbook
647
674
  hdparm
675
+ hyphen-bulgarian
648
676
  iMatix
649
677
  jove
650
678
  libpng-1.6.35
@@ -734,6 +762,7 @@ class Gem::Licenses
734
762
  CGAL-linking-exception
735
763
  CLISP-exception-2.0
736
764
  Classpath-exception-2.0
765
+ Classpath-exception-2.0-short
737
766
  DigiRule-FOSS-exception
738
767
  Digia-Qt-LGPL-exception-1.1
739
768
  FLTK-exception
@@ -775,6 +804,7 @@ class Gem::Licenses
775
804
  SHL-2.0
776
805
  SHL-2.1
777
806
  SWI-exception
807
+ Simple-Library-Usage-exception
778
808
  Swift-exception
779
809
  Texinfo-exception
780
810
  UBDL-exception
@@ -788,12 +818,15 @@ class Gem::Licenses
788
818
  gnu-javamail-exception
789
819
  harbour-exception
790
820
  i2p-gpl-java-exception
821
+ kvirc-openssl-exception
791
822
  libpri-OpenH323-exception
792
823
  mif-exception
793
824
  mxml-exception
794
825
  openvpn-openssl-exception
795
826
  polyparse-exception
796
827
  romic-exception
828
+ rsync-linking-exception
829
+ sqlitestudio-OpenSSL-exception
797
830
  stunnel-exception
798
831
  u-boot-exception-2.0
799
832
  vsftpd-openssl-exception
@@ -158,6 +158,7 @@ class Gem::Version
158
158
 
159
159
  VERSION_PATTERN = '[0-9]+(?>\.[0-9a-zA-Z]+)*(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?' # :nodoc:
160
160
  ANCHORED_VERSION_PATTERN = /\A\s*(#{VERSION_PATTERN})?\s*\z/ # :nodoc:
161
+ RADIX_OPT = [9_500, 3_500, 260_000, 22_227, 24].freeze # :nodoc:
161
162
 
162
163
  ##
163
164
  # A string representation of this Version.
@@ -222,6 +223,7 @@ class Gem::Version
222
223
  end
223
224
  @version = -@version
224
225
  @segments = nil
226
+ @sort_key = compute_sort_key
225
227
  end
226
228
 
227
229
  ##
@@ -344,54 +346,58 @@ class Gem::Version
344
346
  # other types may raise an exception.
345
347
 
346
348
  def <=>(other)
347
- if String === other
348
- return unless self.class.correct?(other)
349
- return self <=> self.class.new(other)
350
- end
351
-
352
- return unless Gem::Version === other
353
- return 0 if @version == other.version || canonical_segments == other.canonical_segments
349
+ if Gem::Version === other
350
+ # Fast path for comparison when available.
351
+ if @sort_key && other.sort_key
352
+ return @sort_key <=> other.sort_key
353
+ end
354
354
 
355
- lhsegments = canonical_segments
356
- rhsegments = other.canonical_segments
355
+ return 0 if @version == other.version || canonical_segments == other.canonical_segments
357
356
 
358
- lhsize = lhsegments.size
359
- rhsize = rhsegments.size
360
- limit = (lhsize > rhsize ? rhsize : lhsize)
357
+ lhsegments = canonical_segments
358
+ rhsegments = other.canonical_segments
361
359
 
362
- i = 0
360
+ lhsize = lhsegments.size
361
+ rhsize = rhsegments.size
362
+ limit = (lhsize > rhsize ? rhsize : lhsize)
363
363
 
364
- while i < limit
365
- lhs = lhsegments[i]
366
- rhs = rhsegments[i]
367
- i += 1
364
+ i = 0
368
365
 
369
- next if lhs == rhs
370
- return -1 if String === lhs && Numeric === rhs
371
- return 1 if Numeric === lhs && String === rhs
366
+ while i < limit
367
+ lhs = lhsegments[i]
368
+ rhs = rhsegments[i]
369
+ i += 1
372
370
 
373
- return lhs <=> rhs
374
- end
371
+ next if lhs == rhs
372
+ return -1 if String === lhs && Numeric === rhs
373
+ return 1 if Numeric === lhs && String === rhs
375
374
 
376
- lhs = lhsegments[i]
375
+ return lhs <=> rhs
376
+ end
377
377
 
378
- if lhs.nil?
379
- rhs = rhsegments[i]
378
+ lhs = lhsegments[i]
380
379
 
381
- while i < rhsize
382
- return 1 if String === rhs
383
- return -1 unless rhs.zero?
384
- rhs = rhsegments[i += 1]
385
- end
386
- else
387
- while i < lhsize
388
- return -1 if String === lhs
389
- return 1 unless lhs.zero?
390
- lhs = lhsegments[i += 1]
380
+ if lhs.nil?
381
+ rhs = rhsegments[i]
382
+
383
+ while i < rhsize
384
+ return 1 if String === rhs
385
+ return -1 unless rhs.zero?
386
+ rhs = rhsegments[i += 1]
387
+ end
388
+ else
389
+ while i < lhsize
390
+ return -1 if String === lhs
391
+ return 1 unless lhs.zero?
392
+ lhs = lhsegments[i += 1]
393
+ end
391
394
  end
392
- end
393
395
 
394
- 0
396
+ 0
397
+ elsif String === other
398
+ return unless self.class.correct?(other)
399
+ self <=> self.class.new(other)
400
+ end
395
401
  end
396
402
 
397
403
  # remove trailing zeros segments before first letter or at the end of the version
@@ -415,6 +421,24 @@ class Gem::Version
415
421
 
416
422
  protected
417
423
 
424
+ attr_reader :sort_key # :nodoc:
425
+
426
+ def compute_sort_key
427
+ return if prerelease?
428
+
429
+ segments = canonical_segments
430
+ return if segments.size > 5
431
+
432
+ key = 0
433
+ RADIX_OPT.each_with_index do |radix, i|
434
+ seg = segments.fetch(i, 0)
435
+ return nil if seg >= radix
436
+ key = key * radix + seg
437
+ end
438
+
439
+ key
440
+ end
441
+
418
442
  def _segments
419
443
  # segments is lazy so it can pick up version values that come from
420
444
  # old marshaled versions, which don't go through marshal_load.
data/lib/rubygems.rb CHANGED
@@ -9,7 +9,7 @@
9
9
  require "rbconfig"
10
10
 
11
11
  module Gem
12
- VERSION = "4.0.9"
12
+ VERSION = "4.0.10"
13
13
  end
14
14
 
15
15
  require_relative "rubygems/defaults"
@@ -192,8 +192,9 @@ module Gem
192
192
  begin
193
193
  spec.activate
194
194
  rescue Gem::LoadError => e # this could fail due to gem dep collisions, go lax
195
+ name = spec.name
195
196
  spec = Gem::Specification.find_unloaded_by_path(path)
196
- spec ||= Gem::Specification.find_by_name(spec.name)
197
+ spec ||= Gem::Specification.find_by_name(name)
197
198
  if spec.nil?
198
199
  raise e
199
200
  else
@@ -1284,10 +1285,17 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
1284
1285
  prefix_pattern = /^(#{prefix_group})/
1285
1286
  end
1286
1287
 
1288
+ native_extension_suffixes = Gem.dynamic_library_suffixes.reject(&:empty?)
1289
+
1287
1290
  spec.files.each do |file|
1288
1291
  if new_format
1289
1292
  file = file.sub(prefix_pattern, "")
1290
- next unless $~
1293
+ unless $~
1294
+ # Also register native extension files (e.g. date_core.bundle)
1295
+ # that are listed without require path prefix in the gemspec
1296
+ next if file.include?("/")
1297
+ next unless file.end_with?(*native_extension_suffixes)
1298
+ end
1291
1299
  end
1292
1300
 
1293
1301
  spec.activate if already_loaded?(file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-update
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.9
4
+ version: 4.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Weirich