Skip to content

Commit ad1fddf

Browse files
authored
Merge pull request #9048 from mhashizume/PUP-11716/main/ruby-3_1
(PUP-11716) Set Ruby requirement to >= 3.1.0
2 parents 026b89a + 6f271c8 commit ad1fddf

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

.gemspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ Gem::Specification.new do |s|
2121
s.version = mdata ? mdata[1] : version
2222

2323
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1")
24-
# Bump this in PUP-11716
25-
s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
24+
s.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
2625
s.authors = ["Puppet Labs"]
2726
s.date = "2012-08-17"
2827
s.description = "Puppet, an automated configuration management tool"

lib/puppet.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
require_relative 'puppet/version'
22
require_relative 'puppet/concurrent/synchronized'
33

4-
# Update JRuby version constraints in PUP-11716
5-
if !defined?(JRUBY_VERSION) && Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new("2.7.0")
6-
raise LoadError, "Puppet #{Puppet.version} requires Ruby 2.7.0 or greater, found Ruby #{RUBY_VERSION.dup}."
4+
Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '3.1.0'
5+
if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
6+
raise LoadError, "Puppet #{Puppet.version} requires Ruby #{Puppet::OLDEST_RECOMMENDED_RUBY_VERSION} or greater, found Ruby #{RUBY_VERSION.dup}."
77
end
88

9-
Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '2.7.0'
10-
119
$LOAD_PATH.extend(Puppet::Concurrent::Synchronized)
1210

1311
# see the bottom of the file for further inclusions

0 commit comments

Comments
 (0)