each_with_progress 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/each_with_progress.rb +2 -2
  2. metadata +3 -3
@@ -3,10 +3,10 @@ module Enumerable
3
3
  out = STDERR
4
4
  count = self.count
5
5
  self.each_with_index do |element,i|
6
- out.print sprintf("%s", ewp_makeProgress(i,count)) + "\r"
6
+ out.print sprintf("%s", ewp_makeProgress(i + 1,count)) + "\r"
7
7
  block.call element
8
8
  end
9
- out.print sprintf("%s"," " + "\r"
9
+ out.print sprintf("%s"," " + "\r")
10
10
  self
11
11
  end
12
12
 
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: each_with_progress
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- version: "0.1"
8
+ - 2
9
+ version: "0.2"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Adam Gamble