From d88e6d730fe8eb860125c1f7c4193d707a85e58b Mon Sep 17 00:00:00 2001 From: Seamus Abshere Date: Mon, 4 Jun 2012 10:30:42 -0500 Subject: [PATCH] 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 --- lib/mongo/util/uri_parser.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mongo/util/uri_parser.rb b/lib/mongo/util/uri_parser.rb index 24b3d02..3b312fe 100644 --- a/lib/mongo/util/uri_parser.rb +++ b/lib/mongo/util/uri_parser.rb @@ -267,7 +267,7 @@ module Mongo end 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 end