aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-07-23 13:24:24 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2011-07-23 13:24:24 -0700
commitc3346b31c9ddb564bdd0648e03f077035fcaacb9 (patch)
treedf719eb6e9bd7e14ef37b10a52107ddfef35da49 /activesupport
parentabe61054af9aaceb546adfd629c50a027862a521 (diff)
parent3fe32c355453f517acfda48a87edf2d6928a381a (diff)
downloadrails-c3346b31c9ddb564bdd0648e03f077035fcaacb9.tar.gz
rails-c3346b31c9ddb564bdd0648e03f077035fcaacb9.tar.bz2
rails-c3346b31c9ddb564bdd0648e03f077035fcaacb9.zip
Merge pull request #2218 from guilleiguaran/avoid-map-chaining
Remove unneccesary map chaining
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/ordered_hash.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb
index 68f4bd66da..7f70628933 100644
--- a/activesupport/lib/active_support/ordered_hash.rb
+++ b/activesupport/lib/active_support/ordered_hash.rb
@@ -6,7 +6,7 @@ end
require 'yaml'
YAML.add_builtin_type("omap") do |type, val|
- ActiveSupport::OrderedHash[val.map(&:to_a).map(&:first)]
+ ActiveSupport::OrderedHash[val.map{ |v| v.to_a.first }]
end
module ActiveSupport