Skip to content

Commit

Permalink
Use cached instance of ruby_version inside RubyGems
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jan 5, 2023
1 parent d192ba1 commit 3ba0795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/ruby_version_check.rb
@@ -1,6 +1,6 @@
# frozen_string_literal: true

if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.7.0") && RUBY_ENGINE == "ruby"
if RubyGems.ruby_version < Gem::Version.new("2.7.0") && RUBY_ENGINE == "ruby"
desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
abort <<-end_message
Expand Down

0 comments on commit 3ba0795

Please sign in to comment.