module MoreMath::RankingCommon
def each!
of them will reference the same (this!) instance. If you want to do this
not a good idea to put the yielded values in a data structure because all
method on the yielded value and work with the result of this call. It's
modified self instead. This is useful if one only wants to call a
instances (less overhead) for every iteration step, but yields to a
Does something similar to #each. It doesn't create new
def each! old_rank = rank 0.upto(last) do |r| self.rank = r yield self end self ensure self.rank = old_rank end