Skip to content

Commit

Permalink
Avoid modifying frozen string literals (#1364)
Browse files Browse the repository at this point in the history
In particular, the extconf.rb build script. But there's also one test as well.
  • Loading branch information
pat authored Sep 5, 2024
1 parent 00d6920 commit 450d070
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ext/mysql2/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def add_ssl_defines(header)
/usr/local/opt/mysql@*
/usr/local/opt/mysql-client
/usr/local/opt/mysql-client@*
].map { |dir| dir << '/bin' }
].map { |dir| "#{dir}/bin" }

# For those without HOMEBREW_ROOT in PATH
dirs << "#{ENV['HOMEBREW_ROOT']}/bin" if ENV['HOMEBREW_ROOT']
Expand Down
2 changes: 1 addition & 1 deletion spec/mysql2/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def run_gc
end

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

Expand Down

0 comments on commit 450d070

Please sign in to comment.