Merge pull request #31641 from ckoenig/remove_frozen_string_literal

Use dup'ed options hash
This commit is contained in:
Yuji Yaginuma 2018-01-20 18:53:10 +09:00 committed by GitHub
commit 9bf41f2495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -315,11 +315,13 @@ def gem_for_database
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