Skip to content

Commit ff9bc9c

Browse files
yahondaclaude
andcommitted
Drop redundant .to_s inside string interpolation
In `CallableStatement#bind_param_index` the leading-colon normalization wrote `":#{key.to_s}"`. String interpolation already invokes `to_s` on the embedded expression, so the explicit call is redundant. The `key.to_s =~ /^:/` on the right-hand side is intentionally kept; that one is outside the interpolation and ensures the regex match receives a String regardless of whether `key` is a Symbol or String. No behavior change. Full suite is green (468 examples, 0 failures, 1 pre-existing pending). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e12dd09 commit ff9bc9c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/plsql/jdbc_connection.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def close
189189

190190
def bind_param_index(key)
191191
return key if key.kind_of? Integer
192-
key = ":#{key.to_s}" unless key.to_s =~ /^:/
192+
key = ":#{key}" unless key.to_s =~ /^:/
193193
@params.index(key) + 1
194194
end
195195
end

0 commit comments

Comments
 (0)