From 169626359e5e969cf2f2e1a7c0130221cc14e92d Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 6 Aug 2007 07:58:45 +0000 Subject: * 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 --- sample/test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sample') 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 -- cgit