summaryrefslogtreecommitdiffstats
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
commit21699cf603a147f18cc99c4c6489c68379302d04 (patch)
tree33ef218985010dc6894c9b9d24ec5f87b455fb45 /sample
parentbd6e77ae1f0253eb6f4bbd1807e8336f97ab9670 (diff)
downloadruby-21699cf603a147f18cc99c4c6489c68379302d04.tar.gz
ruby-21699cf603a147f18cc99c4c6489c68379302d04.tar.xz
ruby-21699cf603a147f18cc99c4c6489c68379302d04.zip
ext/exmk.rb.in, lib/singleton.rb: remove nested ""s.
git-svn-id: http://svn.ruby-lang.org/repos/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 2c4f99f1e..35855acaa 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