summaryrefslogtreecommitdiff
path: root/sample/sieve.rb
diff options
context:
space:
mode:
authorYukihiro Matsumoto <matz@ruby-lang.org>1995-02-09 16:18:37 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-17 22:09:31 +0900
commitc080fb6d10bbcb697b6ba16e640de8db3f1973d0 (patch)
tree2df6299a382a47f1bed94ea2c8dedc64113d79c9 /sample/sieve.rb
parent897cf066952978ccbae1d57bbc14a03c7b98a1e1 (diff)
version 0.66v0_66
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.65-0.66.diff.gz Thu Feb 9 16:18:37 1995 Yukihiro Matsumoto (matz@ix-02) * version 0.66 * parse.y: protectをbeginに変更.begin..endは例外処理だけでなく, 文括弧としても働くことになった.
Diffstat (limited to 'sample/sieve.rb')
-rw-r--r--sample/sieve.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/sieve.rb b/sample/sieve.rb
index eaf4e33..640cc32 100644
--- a/sample/sieve.rb
+++ b/sample/sieve.rb
@@ -5,7 +5,7 @@ max = max.to_i
print "1"
for i in 2 .. max
- protect
+ begin
for d in sieve
fail if i % d == 0
end