Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Update #each methods to work when no block provided
Browse files Browse the repository at this point in the history
  • Loading branch information
dkubb committed Jan 24, 2013
1 parent d610a56 commit 422176a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/dm-core/support/ordered_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def clear
#
# @api private
def each
return to_enum unless block_given?
entries.each { |entry| yield(entry) }
self
end
Expand Down
1 change: 1 addition & 0 deletions lib/dm-core/support/subject_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def [](name)
#
# @api private
def each
return to_enum unless block_given?
entries.each { |entry| yield(entry) }
self
end
Expand Down

0 comments on commit 422176a

Please sign in to comment.