Browse files

Merge pull request #2218 from guilleiguaran/avoid-map-chaining

Remove unneccesary map chaining
  • Loading branch information...
2 parents abe6105 + 3fe32c3 commit c3346b31c9ddb564bdd0648e03f077035fcaacb9 @tenderlove tenderlove committed Jul 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/ordered_hash.rb
View
2 activesupport/lib/active_support/ordered_hash.rb
@@ -6,7 +6,7 @@
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

0 comments on commit c3346b3

Please sign in to comment.