Skip to content

Commit

Permalink
Use #inspect
Browse files Browse the repository at this point in the history
  • Loading branch information
bensheldon committed Jan 30, 2024
1 parent 76701e5 commit bdb0aa3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contrib/ruby/lib/trilogy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Trilogy

def initialize(options = {})
invalid_keys = options.keys - VALID_OPTIONS
$stderr.puts "WARNING: Unknown Trilogy options: #{invalid_keys.join(", ")}" unless invalid_keys.empty?
$stderr.puts "[WARNING] Unknown Trilogy options: #{invalid_keys.map(&:inspect).join(", ")}" unless invalid_keys.empty?

options[:port] = options[:port].to_i if options[:port]
mysql_encoding = options[:encoding] || "utf8mb4"
Expand Down
4 changes: 2 additions & 2 deletions contrib/ruby/test/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def test_trilogy_connection_options
tls_min_version: 3,
}
assert_equal expected_connection_options, client.connection_options
assert_output('', /WARNING/) { new_tcp_client({ unknown: "key" }) }

assert_output('', /\[WARNING\] Unknown Trilogy options: :foo, "bar"/) { new_tcp_client({ foo: "", "bar" => "" }) }
end

def test_trilogy_ping
Expand Down

0 comments on commit bdb0aa3

Please sign in to comment.