From 163a6e81b207525e4f35e21464ee5ab3afbd3cb5 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 23 Dec 2003 10:43:04 +0000 Subject: * 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@5261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_system.rb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/ruby/test_system.rb') diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 71eb7ad183..a19f6ef9b7 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 -- cgit v1.2.3