aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorGabriel Horner <gabriel.horner@gmail.com>2011-02-02 09:58:40 -0500
committerSantiago Pastorino <santiago@wyeworks.com>2011-02-02 13:40:36 -0200
commit9a0f43d3c1dd35fde074af6cc2825ae1872aabef (patch)
tree4e8787a67f10d04125c88b2b685e03caf1a55ebf /activesupport/lib
parent8dcacd0cc7fe634ed0bedbc21dfbb0da46298686 (diff)
downloadrails-9a0f43d3c1dd35fde074af6cc2825ae1872aabef.tar.gz
rails-9a0f43d3c1dd35fde074af6cc2825ae1872aabef.tar.bz2
rails-9a0f43d3c1dd35fde074af6cc2825ae1872aabef.zip
OrderedHash#each* methods return self like Hash does [#6364 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/ordered_hash.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb
index ac20988230..b2f04b427b 100644
--- a/activesupport/lib/active_support/ordered_hash.rb
+++ b/activesupport/lib/active_support/ordered_hash.rb
@@ -138,14 +138,17 @@ module ActiveSupport
def each_key
@keys.each { |key| yield key }
+ self
end
def each_value
@keys.each { |key| yield self[key]}
+ self
end
def each
@keys.each {|key| yield [key, self[key]]}
+ self
end
alias_method :each_pair, :each