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

This commit is contained in:
Seamus Abshere 2012-06-04 10:30:42 -05:00
parent d8f94e6f63
commit d88e6d730f

View File

@ -267,7 +267,7 @@ module Mongo
end end
opts = CGI.parse(string_opts).inject({}) do |memo, (key, value)| opts = CGI.parse(string_opts).inject({}) do |memo, (key, value)|
value = value[0] value = value.first
memo[key.downcase.to_sym] = value.strip.downcase memo[key.downcase.to_sym] = value.strip.downcase
memo memo
end end