diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 07:58:45 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-08-06 07:58:45 +0000 |
commit | 18c81c3d3ef53c6548c5fa0cad90efe2b3ae93cf (patch) | |
tree | 4cf21759320fcb901d4433bd543205c300098c39 /sample | |
parent | 1951ef76cec33f2e6abcdb1a017972d53c032cfb (diff) | |
download | ruby-18c81c3d3ef53c6548c5fa0cad90efe2b3ae93cf.tar.gz |
* sample/test.rb: fix to output file name if it contains
invalid syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb index 387630d66e..62695efbce 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1880,12 +1880,13 @@ end def valid_syntax?(code, fname) eval("BEGIN {return true}\n#{code}", nil, fname, 0) rescue Exception - puts $!.message + STDERR.puts $!.message false end for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"] unless valid_syntax? IO::read(script), script + STDERR.puts script $bad = true end end |