Skip to content

Commit d88e6d7

Browse files
committed
Since it's confusing anyway that CGI.parse returns values as arrays, use an array-specific method (as opposed to one that could be for strings or hashes) to access it
1 parent d8f94e6 commit d88e6d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/mongo/util/uri_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ def parse_options(string_opts, extra_opts={})
267267
end
268268

269269
opts = CGI.parse(string_opts).inject({}) do |memo, (key, value)|
270-
value = value[0]
270+
value = value.first
271271
memo[key.downcase.to_sym] = value.strip.downcase
272272
memo
273273
end

0 commit comments

Comments
 (0)