Skip to content

Commit 450d070

Browse files
authored
Avoid modifying frozen string literals (#1364)
In particular, the extconf.rb build script. But there's also one test as well.
1 parent 00d6920 commit 450d070

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/mysql2/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def add_ssl_defines(header)
8686
/usr/local/opt/mysql@*
8787
/usr/local/opt/mysql-client
8888
/usr/local/opt/mysql-client@*
89-
].map { |dir| dir << '/bin' }
89+
].map { |dir| "#{dir}/bin" }
9090

9191
# For those without HOMEBREW_ROOT in PATH
9292
dirs << "#{ENV['HOMEBREW_ROOT']}/bin" if ENV['HOMEBREW_ROOT']

spec/mysql2/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ def run_gc
886886
end
887887

888888
it "should carry over the original string's encoding" do
889-
str = "abc'def\"ghi\0jkl%mno"
889+
str = "abc'def\"ghi\0jkl%mno".dup
890890
escaped = Mysql2::Client.escape(str)
891891
expect(escaped.encoding).to eql(str.encoding)
892892

0 commit comments

Comments
 (0)