From 1b7c3222e86b98ce886110ae0860ba62e35e2299 Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Wed, 19 Dec 2018 21:09:34 +0100 Subject: Require Ruby 2.5 for Rails 6. Generally followed the pattern for https://github.com/rails/rails/pull/32034 * Removes needless CI configs for 2.4 * Targets 2.5 in rubocop * Updates existing CHANGELOG entries for fewer merge conflicts * Removes Hash#slice extension as that's inlined on Ruby 2.5. * Removes the need for send on define_method in MethodCallAssertions. --- railties/CHANGELOG.md | 4 ++-- railties/lib/rails/ruby_version_check.rb | 6 +++--- railties/railties.gemspec | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md index 59024b13ef..8e358b4293 100644 --- a/railties/CHANGELOG.md +++ b/railties/CHANGELOG.md @@ -241,9 +241,9 @@ *Benoit Tigeot* -* Rails 6 requires Ruby 2.4.1 or newer. +* Rails 6 requires Ruby 2.5.0 or newer. - *Jeremy Daer* + *Jeremy Daer*, *Kasper Timm Hansen* Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/railties/CHANGELOG.md) for previous changes. diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index b2d44d9b8e..ab5339bf24 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,15 +1,15 @@ # frozen_string_literal: true -if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4.1") && RUBY_ENGINE == "ruby" +if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0") && RUBY_ENGINE == "ruby" desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message - Rails 6 requires Ruby 2.4.1 or newer. + Rails 6 requires Ruby 2.5.0 or newer. You're running #{desc} - Please upgrade to Ruby 2.4.1 or newer to continue. + Please upgrade to Ruby 2.5.0 or newer to continue. end_message end diff --git a/railties/railties.gemspec b/railties/railties.gemspec index 91407ee1ae..1bfb0dfe48 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.summary = "Tools for creating, working with, and running Rails applications." s.description = "Rails internals: application bootup, plugins, generators, and rake tasks." - s.required_ruby_version = ">= 2.4.1" + s.required_ruby_version = ">= 2.5.0" s.license = "MIT" -- cgit v1.2.3