Skip to content

Commit 0e05616

Browse files
committed
Use the new enem_to_s method
1 parent 98ebfd2 commit 0e05616

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/thor/parser/arguments.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def parse_array(name)
122122
value = shift
123123
if !value.empty? && @switches.is_a?(Hash) && switch = @switches[name]
124124
if switch.enum && !switch.enum.include?(value)
125-
raise MalformattedArgumentError, "Expected all values of '#{name}' to be one of #{switch.enum.join(', ')}; got #{value}"
125+
raise MalformattedArgumentError, "Expected all values of '#{name}' to be one of #{switch.enum_to_s}; got #{value}"
126126
end
127127
end
128128
array << value

0 commit comments

Comments
 (0)