summaryrefslogtreecommitdiff
path: root/sample/test.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 07:58:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-06 07:58:45 +0000
commit18c81c3d3ef53c6548c5fa0cad90efe2b3ae93cf (patch)
tree4cf21759320fcb901d4433bd543205c300098c39 /sample/test.rb
parent1951ef76cec33f2e6abcdb1a017972d53c032cfb (diff)
* 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/test.rb')
-rw-r--r--sample/test.rb3
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