summaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 10:43:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-23 10:43:04 +0000
commit6670d5c3abe1e8a3b3b549c5eb710dbaeb402027 (patch)
tree092e4838bf4d94d7c99780b984c1d734c533eaab /test/ruby
parent19842730050fa56c1abb97bf3412f2a73312401f (diff)
downloadruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.tar.gz
ruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.tar.xz
ruby-6670d5c3abe1e8a3b3b549c5eb710dbaeb402027.zip
* io.c (rb_io_ungetc): raise an exception at unread stream to
avoid unspecified behavior. [ruby-dev:22330] * test/ruby/test_system.rb (test_syntax): glob relatively from __FILE__. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_system.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb
index 71eb7ad18..a19f6ef9b 100644
--- a/test/ruby/test_system.rb
+++ b/test/ruby/test_system.rb
@@ -54,15 +54,11 @@ class TestSystem < Test::Unit::TestCase
File.unlink "script_tmp" or `/bin/rm -f "script_tmp"`
File.unlink "script_tmp.bak" or `/bin/rm -f "script_tmp.bak"`
+ end
- if (dir = File.dirname(File.dirname($0))) == '.'
- dir = ""
- else
- dir << "/"
- end
-
+ def test_syntax
assert_nothing_raised(Exception) do
- for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
+ for script in Dir[File.expand_path("../../../{lib,sample,ext}/**/*.rb", __FILE__)]
valid_syntax? IO::read(script), script
end
end