summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-19 05:46:20 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-03-19 05:46:20 +0000
commitbc343b851d04f68ef7554a2cca0bad63a32c2b7d (patch)
tree34701ea26f297294c1ab55561610227fcd761eba /vm_eval.c
parent22198f9d3c384dbc3e95b953d71a07de12da652b (diff)
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.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 686b7e030c..9f2762fc1a 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -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) {