diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-11-08 08:50:11 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-11-08 08:56:18 +0000 |
commit | 100124a50620271e9c7317c28efacdee3cc568e3 (patch) | |
tree | 93b8053979de0dc89a009163fef7122705154c68 | |
parent | 9bdb7b8ca1016010277a8c5fcc96a97ee82b3558 (diff) | |
download | mogilefs-client-100124a50620271e9c7317c28efacdee3cc568e3.tar.gz |
Obviously I could go farther, but not at the expense of readability. There are C libraries I could use, but MogileFS may move to a JSON-based protocol in the future anyways...
-rw-r--r-- | lib/mogilefs/backend.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/mogilefs/backend.rb b/lib/mogilefs/backend.rb index 5403c13..df44b37 100644 --- a/lib/mogilefs/backend.rb +++ b/lib/mogilefs/backend.rb @@ -242,9 +242,9 @@ class MogileFS::Backend # Turns a url params string into a Hash. def url_decode(str) - Hash[*(str.split(/&/).map { |pair| - pair.split(/=/, 2).map { |x| url_unescape(x) } - } ).flatten] + Hash[*(str.split(/&/).map! { |pair| + pair.split(/=/, 2).map! { |x| url_unescape(x) } + } ).flatten!] end ## |