diff options
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/ordered_hash.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/ordered_hash.rb b/activesupport/lib/active_support/ordered_hash.rb index 762a64a881..68f4bd66da 100644 --- a/activesupport/lib/active_support/ordered_hash.rb +++ b/activesupport/lib/active_support/ordered_hash.rb @@ -158,7 +158,11 @@ module ActiveSupport self end - alias_method :each_pair, :each + def each_pair + return to_enum(:each_pair) unless block_given? + @keys.each {|key| yield key, self[key]} + self + end alias_method :select, :find_all |