Skip to content
Permalink
Browse files

style fixes

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 27, 2013
1 parent 5747acb commit 8aa260a62be3e4ddc453c0906934a816568d71ef
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib-topaz/enumerable.rb
  2. +1 −1 lib-topaz/enumerator.rb
@@ -12,7 +12,7 @@ def map(&block)
return self.enum_for(:map) unless block
result = []
self.each do |*x|
result << (yield *x)
result << yield(*x)
end
result
end
@@ -208,7 +208,7 @@ def min(&block)

def max_by(&block)
return self.enum_for(:max_by) unless block
max = maxv = nil
max = maxv = nil
self.each_with_index do |e, i|
ev = yield(e)
max, maxv = e, ev if i == 0 || Topaz.compare(ev, maxv) > 0
@@ -71,7 +71,7 @@ def initialize(&block)
end

def each
proc = Proc.new { |*args| yield *args }
proc = Proc.new { |*args| yield(*args) }
@block.call(Yielder.new(&proc))
end
end

0 comments on commit 8aa260a

Please sign in to comment.