lib/each-with-logging.rb in each-with-logging-0.1.0 vs lib/each-with-logging.rb in each-with-logging-0.1.1
- old
+ new
@@ -1,9 +1,9 @@
module Enumerable
def each_with_logging(logger = nil)
len = self.length
self.each_with_index{|value, index|
- message = "#{caller[3]} #{index+1} / #{len}"
+ message = "#{caller[-2]} #{index+1} / #{len}"
logger.respond_to?(:debug) ? logger.debug(message) : warn(message)
yield value
}
end
end