1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2003-12-23 10:43:04 +00:00
parent 44182056f6
commit 163a6e81b2
3 changed files with 15 additions and 10 deletions

View file

@ -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