summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-09 18:04:08 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-04-09 18:04:08 +0000
commit32e799db485107ba9d47fb4fb4cd44c9d6f57b8a (patch)
treee33fd45f76d7f31959c1e5298902588de716657c /sample
parent35247a52ef719584a59ae9c518523f0ee825c8e3 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/list.rb2
-rw-r--r--sample/test.rb6
-rw-r--r--sample/trojan.rb3
3 files changed, 6 insertions, 5 deletions
diff --git a/sample/list.rb b/sample/list.rb
index 17eefae85a..221f7edb16 100644
--- a/sample/list.rb
+++ b/sample/list.rb
@@ -64,7 +64,7 @@ class Point
end
end
-# global variables are start with `$'.
+# global variable name starts with `$'.
$list1 = MyList.new
$list1.add_to_list(10)
$list1.add_to_list(20)
diff --git a/sample/test.rb b/sample/test.rb
index ad4cf20269..57641448ff 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -417,7 +417,7 @@ ok(i == 5)
done = true
loop{
break
- done = false
+ done = false # should not reach here
}
ok(done)
@@ -427,7 +427,7 @@ loop {
break if done
done = true
next
- $bad = true
+ $bad = true # should not reach here
}
ok(!$bad)
@@ -437,7 +437,7 @@ loop {
break if done
done = true
redo
- $bad = true
+ $bad = true # should not reach here
}
ok(!$bad)
diff --git a/sample/trojan.rb b/sample/trojan.rb
index edf8ee63ce..6e9b18f502 100644
--- a/sample/trojan.rb
+++ b/sample/trojan.rb
@@ -1,5 +1,6 @@
#! /usr/local/bin/ruby
-path = ENV['PATH'].split(/:/)
+
+path = ENV['PATH'].split(File::PATH_SEPARATOR)
for dir in path
if File.directory?(dir)