lib/ronin/extensions/file.rb in ronin-support-0.5.0.rc2 vs lib/ronin/extensions/file.rb in ronin-support-0.5.0

- old
+ new

@@ -42,11 +42,11 @@ # @since 0.3.0 # # @api public # def File.each_line(path) - return enum_for(:each_line,path) unless block_given? + return enum_for(__method__,path) unless block_given? File.open(path) do |file| file.each_line { |line| yield line.chomp } end end @@ -77,10 +77,10 @@ # @since 0.3.0 # # @api public # def File.each_row(path,separator=/\s+/) - return enum_for(:each_row,path,separator) unless block_given? + return enum_for(__method__,path,separator) unless block_given? File.each_line(path) { |line| yield line.split(separator) } end #