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 | 169626359e5e969cf2f2e1a7c0130221cc14e92d (patch) | |
tree | 4cf21759320fcb901d4433bd543205c300098c39 | |
parent | 9f2b59b4e9664b78927869a8018810290b901dbf (diff) | |
download | ruby-169626359e5e969cf2f2e1a7c0130221cc14e92d.tar.gz ruby-169626359e5e969cf2f2e1a7c0130221cc14e92d.tar.xz ruby-169626359e5e969cf2f2e1a7c0130221cc14e92d.zip |
* sample/test.rb: fix to output file name if it contains
invalid syntax.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | sample/test.rb | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Mon Aug 6 16:57:08 2007 Koichi Sasada <ko1@atdot.net> + + * sample/test.rb: fix to output file name if it contains + invalid syntax. + Mon Aug 6 16:41:22 2007 Koichi Sasada <ko1@atdot.net> * parse.y (value_expr_gen): fix to cause "void value expression" diff --git a/sample/test.rb b/sample/test.rb index 387630d66..62695efbc 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 |