Skip to content

Commit 1d4eb64

Browse files
committed
Fix frozen string errors
1 parent 311cef4 commit 1d4eb64

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/puppet/provider/mysql_user/mysql.rb

+7-7
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ def password_hash=(string)
159159
else
160160
concat_name = @resource[:name]
161161
sql = "UPDATE mysql.user SET password = '', plugin = 'ed25519'"
162-
sql << ", authentication_string = '#{string}'"
163-
sql << " where CONCAT(user, '@', host) = '#{concat_name}'; FLUSH PRIVILEGES"
162+
sql += ", authentication_string = '#{string}'"
163+
sql += " where CONCAT(user, '@', host) = '#{concat_name}'; FLUSH PRIVILEGES"
164164
end
165165
self.class.mysql_caller(sql, 'system')
166166
elsif newer_than('mysql' => '5.7.6', 'percona' => '5.7.6', 'mariadb' => '10.2.0')
@@ -210,17 +210,17 @@ def plugin=(string)
210210
else
211211
concat_name = @resource[:name]
212212
sql = "UPDATE mysql.user SET password = '', plugin = '#{string}'"
213-
sql << ", authentication_string = '#{@resource[:password_hash]}'"
214-
sql << " where CONCAT(user, '@', host) = '#{concat_name}'; FLUSH PRIVILEGES"
213+
sql += ", authentication_string = '#{@resource[:password_hash]}'"
214+
sql += " where CONCAT(user, '@', host) = '#{concat_name}'; FLUSH PRIVILEGES"
215215
end
216216
elsif newer_than('mysql' => '5.7.6', 'percona' => '5.7.6', 'mariadb' => '10.2.0')
217217
sql = "ALTER USER #{merged_name} IDENTIFIED WITH '#{string}'"
218-
sql << " AS '#{@resource[:password_hash]}'" if string == 'mysql_native_password'
218+
sql += " AS '#{@resource[:password_hash]}'" if string == 'mysql_native_password'
219219
else
220220
# See https://bugs.mysql.com/bug.php?id=67449
221221
sql = "UPDATE mysql.user SET plugin = '#{string}'"
222-
sql << ((string == 'mysql_native_password') ? ", password = '#{@resource[:password_hash]}'" : ", password = ''")
223-
sql << " WHERE CONCAT(user, '@', host) = '#{@resource[:name]}'"
222+
sql += ((string == 'mysql_native_password') ? ", password = '#{@resource[:password_hash]}'" : ", password = ''")
223+
sql += " WHERE CONCAT(user, '@', host) = '#{@resource[:name]}'"
224224
end
225225

226226
self.class.mysql_caller(sql, 'system')

0 commit comments

Comments
 (0)