summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-13 04:53:39 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-13 04:53:39 +0000
commit8a6092725d5e54f1be68edb6098dcd08c68f939d (patch)
tree33ef218985010dc6894c9b9d24ec5f87b455fb45 /sample
parentb3ecbfaa01e7c75bfea9c895bb7476c58e998131 (diff)
ext/exmk.rb.in, lib/singleton.rb: remove nested ""s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/sample/test.rb b/sample/test.rb
index 2c4f99f..35855ac 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -1209,15 +1209,16 @@ else
dir << "/"
end
-def valid_syntax?(code)
- eval("BEGIN {return true}\n#{code}")
+def valid_syntax?(code, fname)
+ eval("BEGIN {return true}\n#{code}", nil, fname)
rescue Exception
+ p $!
ensure
false
end
for script in Dir["#{dir}{lib,sample,ext}/**/*.rb"]
- unless valid_syntax? IO::read(script)
+ unless valid_syntax? IO::read(script), script
$bad = true
end
end