aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.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
commitaedece589291dc8be6350935f432376a9b4a212b (patch)
tree34701ea26f297294c1ab55561610227fcd761eba /ruby.c
parente91339cd217f7353d71498c04fb824a7f4c93c2f (diff)
downloadruby-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 'ruby.c')
-rw-r--r--ruby.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index f96202e217..d163f40dc5 100644
--- a/ruby.c
+++ b/ruby.c
@@ -1948,6 +1948,14 @@ rb_load_file_str(VALUE fname_v)
return load_file(rb_parser_new(), fname_v, 0, cmdline_options_init(&opt));
}
+void *
+rb_parser_load_file(VALUE parser, VALUE fname_v)
+{
+ struct cmdline_options opt;
+
+ return load_file(parser, fname_v, 0, cmdline_options_init(&opt));
+}
+
/*
* call-seq:
* Process.argv0 -> frozen_string