summaryrefslogtreecommitdiff
path: root/sample/sieve.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/sieve.rb')
-rw-r--r--sample/sieve.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/sieve.rb b/sample/sieve.rb
index 192a586..eaf4e33 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"