aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2018-04-19 16:13:41 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2018-04-19 16:13:41 -0500
commit2bf11187eef95192a12077124f9a4f10305945aa (patch)
tree1479cc67729a3fc9aa47c530a4ff15173c57ef82 /railties
parentd26f48a57453844ad81503fe71ba24a1d2a1a1b7 (diff)
downloadrails-2bf11187eef95192a12077124f9a4f10305945aa.tar.gz
rails-2bf11187eef95192a12077124f9a4f10305945aa.tar.bz2
rails-2bf11187eef95192a12077124f9a4f10305945aa.zip
Create a .ruby-version compatible with MRI/JRuby by default
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/generators/rails/app/templates/ruby-version.tt2
-rw-r--r--railties/test/generators/app_generator_test.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/ruby-version.tt b/railties/lib/rails/generators/rails/app/templates/ruby-version.tt
index c444f33b0f..19f0d7f202 100644
--- a/railties/lib/rails/generators/rails/app/templates/ruby-version.tt
+++ b/railties/lib/rails/generators/rails/app/templates/ruby-version.tt
@@ -1 +1 @@
-<%= RUBY_VERSION -%>
+<%= "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}" -%>
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb
index c3809a912b..970f0639be 100644
--- a/railties/test/generators/app_generator_test.rb
+++ b/railties/test/generators/app_generator_test.rb
@@ -851,7 +851,7 @@ class AppGeneratorTest < Rails::Generators::TestCase
assert_match(/ruby '#{RUBY_VERSION}'/, content)
end
assert_file ".ruby-version" do |content|
- assert_match(/#{RUBY_VERSION}/, content)
+ assert_match(/#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION}/, content)
end
end