diff options
| author | Xavier Noria <fxn@hashref.com> | 2026-02-09 13:46:05 +0100 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2026-02-09 21:32:50 +0000 |
| commit | 51d4c2c465e3ce708dddcd65d93e6e29225b454d (patch) | |
| tree | 0bb27327fd7ed92737b9a0beb08218ffb29d790d | |
| parent | 3d00e34ab1d533820d2cd8bc361549b336767c9c (diff) | |
[ruby/rubygems] Document gemspecs must be deterministic
https://github.com/ruby/rubygems/commit/7cab5cd68f
| -rw-r--r-- | lib/rubygems/specification.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index aa495696ad..64f289a7b4 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -34,6 +34,15 @@ require "rbconfig" # Starting in RubyGems 2.0, a Specification can hold arbitrary # metadata. See #metadata for restrictions on the format and size of metadata # items you may add to a specification. +# +# Specifications must be deterministic, as in the example above. For instance, +# you cannot define attributes conditionally: +# +# # INVALID: do not do this. +# unless RUBY_ENGINE == "jruby" +# s.extensions << "ext/example/extconf.rb" +# end +# class Gem::Specification < Gem::BasicSpecification # REFACTOR: Consider breaking out this version stuff into a separate |
