Skip to content

Commit df0ad50

Browse files
SyatiCopilot
andauthored
Update lib/structured_params.rb
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 5984949 commit df0ad50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/structured_params.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def initialize
5454

5555
#: (Integer) -> void
5656
def array_index_base=(value)
57-
raise ArgumentError, "array_index_base must be 0 or 1, got: #{value.inspect}" unless [0, 1].include?(value)
57+
raise ArgumentError, "array_index_base must be 0 or 1, got: #{value.inspect}" unless value.is_a?(Integer) && [0, 1].include?(value)
5858

5959
@array_index_base = value
6060
end

0 commit comments

Comments
 (0)