lib/citeproc/names.rb in citeproc-1.0.9 vs lib/citeproc/names.rb in citeproc-1.0.10
- old
+ new
@@ -687,12 +687,12 @@
# Calls a block once for each name. If no block is given, an enumerator
# is returned instead.
#
# @yieldparam name [Name] a name in the list
# @return [self,Enumerator] self or an enumerator if no block is given
- def each
+ def each(&block)
if block_given?
- names.each(&Proc.new)
+ names.each(&block)
self
else
to_enum
end
end