summaryrefslogtreecommitdiff
path: root/sample
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
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')
-rw-r--r--sample/occur2.rb2
-rw-r--r--sample/ruby-mode.el2
-rw-r--r--sample/sieve.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/sample/occur2.rb b/sample/occur2.rb
index 899294e..8cd5acb 100644
--- a/sample/occur2.rb
+++ b/sample/occur2.rb
@@ -3,7 +3,7 @@
freq = {}
while gets()
for word in $_.split(/\W+/)
- protect
+ begin
freq[word] = freq[word] + 1
resque
freq[word] = 1
diff --git a/sample/ruby-mode.el b/sample/ruby-mode.el
index 7f97e71..4396b10 100644
--- a/sample/ruby-mode.el
+++ b/sample/ruby-mode.el
@@ -8,7 +8,7 @@
;;;
(defconst ruby-block-beg-re
- "class\\|module\\|def\\|if\\|unless\\|case\\|while\\|until\\|for\\|protect"
+ "class\\|module\\|def\\|if\\|unless\\|case\\|while\\|until\\|for\\|begin"
)
(defconst ruby-block-mid-re
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