diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index d22b0156e3..40a5bddff6 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -287,6 +287,15 @@ class Gem::Specification < Gem::BasicSpecification ###################################################################### # :section: Recommended gemspec attributes + ## + # The version of Ruby required by this gem + # + # Usage: + # + # spec.required_ruby_version = '>= 2.7.0' + + attr_reader :required_ruby_version + ## # A long description of this gem # @@ -522,11 +531,6 @@ class Gem::Specification < Gem::BasicSpecification @require_paths = Array(val) end - ## - # The version of Ruby required by this gem - - attr_reader :required_ruby_version - ## # The RubyGems version required by this gem