diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-19 05:46:20 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-03-19 05:46:20 +0000 |
commit | aedece589291dc8be6350935f432376a9b4a212b (patch) | |
tree | 34701ea26f297294c1ab55561610227fcd761eba /vm_eval.c | |
parent | e91339cd217f7353d71498c04fb824a7f4c93c2f (diff) | |
download | ruby-aedece589291dc8be6350935f432376a9b4a212b.tar.gz |
SyntaxError message at iseq compile
* iseq.c (rb_iseq_compile_with_option): make the parser in mild
error.
* load.c (rb_load_internal0): ditto.
* parse.y (yycompile0): return the error message within the error
to be raised. [Feature #11951]
* parse.y (parser_compile_error): accumulate error messages in the
error_buffer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 5 |
1 files changed, 0 insertions, 5 deletions
@@ -1284,7 +1284,6 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ rb_env_t *env = NULL; rb_block_t block, *base_block; volatile int parse_in_eval; - volatile int mild_compile_error; volatile VALUE file; volatile int line; @@ -1292,7 +1291,6 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ line = lineno; parse_in_eval = th->parse_in_eval; - mild_compile_error = th->mild_compile_error; TH_PUSH_TAG(th); if ((state = TH_EXEC_TAG()) == 0) { rb_cref_t *cref = cref_arg; @@ -1343,9 +1341,7 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ /* make eval iseq */ th->parse_in_eval++; - th->mild_compile_error++; iseq = rb_iseq_compile_with_option(src, fname, absolute_path, INT2FIX(line), base_block, Qnil); - th->mild_compile_error--; th->parse_in_eval--; if (!cref && base_block->iseq) { @@ -1373,7 +1369,6 @@ eval_string_with_cref(VALUE self, VALUE src, VALUE scope, rb_cref_t *const cref_ result = vm_exec(th); } TH_POP_TAG(); - th->mild_compile_error = mild_compile_error; th->parse_in_eval = parse_in_eval; if (state) { |