aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuji Yaginuma <yuuji.yaginuma@gmail.com>2018-01-20 18:53:10 +0900
committerGitHub <noreply@github.com>2018-01-20 18:53:10 +0900
commit9bf41f249535cf333ca006490def702c1c89cc88 (patch)
tree1df991d3800ca459db6b90c66b028ae1b2364b9d
parent577d83a53d3f935e39b38d06ccfbd984331843ad (diff)
parentc33f47df672ae0bdc52a87abef4257cdcfbaf0f8 (diff)
downloadrails-9bf41f249535cf333ca006490def702c1c89cc88.tar.gz
rails-9bf41f249535cf333ca006490def702c1c89cc88.tar.bz2
rails-9bf41f249535cf333ca006490def702c1c89cc88.zip
Merge pull request #31641 from ckoenig/remove_frozen_string_literal
Use dup'ed options hash
-rw-r--r--railties/lib/rails/generators/app_base.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index e152a95fd3..863a914912 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -315,11 +315,13 @@ module Rails
def convert_database_option_for_jruby
if defined?(JRUBY_VERSION)
- case options[:database]
- when "postgresql" then options[:database].replace "jdbcpostgresql"
- when "mysql" then options[:database].replace "jdbcmysql"
- when "sqlite3" then options[:database].replace "jdbcsqlite3"
+ opt = options.dup
+ case opt[:database]
+ when "postgresql" then opt[:database] = "jdbcpostgresql"
+ when "mysql" then opt[:database] = "jdbcmysql"
+ when "sqlite3" then opt[:database] = "jdbcsqlite3"
end
+ self.options = opt.freeze
end
end