summaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 16:55:30 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-01 16:55:30 +0000
commita57949b140170cec7776d3e073fa8607e4cdcbb7 (patch)
tree3bd25f3a413a1637a826552181c1568b3bbeb9c0 /error.c
parentd3962a1594c33f9be051659e251d9a7964705722 (diff)
downloadruby-a57949b140170cec7776d3e073fa8607e4cdcbb7.tar.gz
ruby-a57949b140170cec7776d3e073fa8607e4cdcbb7.tar.xz
ruby-a57949b140170cec7776d3e073fa8607e4cdcbb7.zip
* Add coverage measurement constant COVERAGE__. This constant is not
for casual use. Usage: (1) assign {} to COVERAGE__, (2) require or load Ruby source file, and (3) COVERAGE__["sourcefilepath"] will return an array whose elements represent number of executions per line of source code. * vm_core.h: add field of coverage array to iseq. * iseq.c (prepare_iseq_build): ditto. * insns.def (trace): update coverage array. * parse.y (coverage): create and initialize coverage array. * compile.h (ADD_TRACE): add trace instruction to update covearge array. * thread.c (clear_coverage): delete coverage array when forking. Otherwise, double count of coverage may occur. * lib/coverage.rb: sample coverage measurement tool. * error.c: distinguish explicitly between parse_in_eval and mild_compile_error. * load.c: ditto. * vm_eval.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 2210a705a..9bf5c27fb 100644
--- a/error.c
+++ b/error.c
@@ -1546,7 +1546,7 @@ err_append(const char *s)
rb_thread_t *th = GET_THREAD();
VALUE err = th->errinfo;
- if (th->parse_in_eval) {
+ if (th->mild_compile_error) {
if (!RTEST(err)) {
err = rb_exc_new2(rb_eSyntaxError, s);
th->errinfo = err;