summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
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 899294ea37..8cd5acbe5e 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 7f97e71c54..4396b1098d 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 eaf4e33e2c..640cc32b08 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