Skip to content

Commit

Permalink
select: suppress "literal string will be frozen" warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Dec 24, 2024
1 parent f4f2093 commit f75966c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/groonga/client/request/select.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2016-2017 Kouhei Sutou <[email protected]>
# Copyright (C) 2016-2024 Sutou Kouhei <[email protected]>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
Expand Down Expand Up @@ -377,7 +377,7 @@ def initialize(request)
# @since 0.5.0
def geo_in_rectangle(column_name_or_point,
top_left, bottom_right)
expression = "geo_in_rectangle(%{column_name_or_point}"
expression = +"geo_in_rectangle(%{column_name_or_point}"
expression << ", %{top_left}"
expression << ", %{bottom_right}"
expression << ")"
Expand Down Expand Up @@ -440,7 +440,7 @@ def geo_in_circle(column_name_or_point,
center,
radius_or_point,
approximate_type="rectangle")
expression = "geo_in_circle(%{column_name_or_point}"
expression = +"geo_in_circle(%{column_name_or_point}"
expression << ", %{center}"
expression << ", %{radius_or_point}"
expression << ", %{approximate_type}"
Expand Down Expand Up @@ -527,7 +527,7 @@ def between(*args)
self.class.column_namify(column_name,
"first",
"#{self.class}\##{__method__}")
expression = "between(%{column_name}"
expression = +"between(%{column_name}"
expression << ", %{min}"
expression << ", %{min_border}"
expression << ", %{max}"
Expand Down Expand Up @@ -578,7 +578,7 @@ def in_values(column_name, *values)
"first",
"#{self.class}\##{__method__}")
expression_values = {column_name: column_name}
expression = "in_values(%{column_name}"
expression = +"in_values(%{column_name}"
values.each_with_index do |value, i|
expression << ", %{value#{i}}"
expression_values[:"value#{i}"] = value
Expand Down Expand Up @@ -764,15 +764,15 @@ def escape_script_syntax_value(value)
ScriptSyntax.format_string(value.to_s)
end
when ::Array
escaped_value = "["
escaped_value = +"["
value.each_with_index do |element, i|
escaped_value << ", " if i > 0
escaped_value << escape_script_syntax_value(element)
end
escaped_value << "]"
escaped_value
when ::Hash
escaped_value = "{"
escaped_value = +"{"
value.each_with_index do |(k, v), i|
escaped_value << ", " if i > 0
escaped_value << escape_script_syntax_value(k.to_s)
Expand Down

0 comments on commit f75966c

Please sign in to comment.