diff options
Diffstat (limited to 'sample/sieve.rb')
-rw-r--r-- | sample/sieve.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/sieve.rb b/sample/sieve.rb index 192a5865d8..eaf4e33e2c 100644 --- a/sample/sieve.rb +++ b/sample/sieve.rb @@ -1,6 +1,6 @@ # sieve of Eratosthenes sieve = [] -unless max = $ARGV.shift; max = 100; end +if ! max = $ARGV.shift; max = 100; end max = max.to_i print "1" @@ -15,3 +15,4 @@ for i in 2 .. max resque end end +print "\n" |