mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[PRISM] Correctly hook up line numbers for eval
This commit is contained in:
parent
1d3b306753
commit
9933377c34
16 changed files with 133 additions and 139 deletions
5
ruby.c
5
ruby.c
|
@ -2347,6 +2347,8 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
|
||||
if (dump & (DUMP_BIT(prism_parsetree))) {
|
||||
pm_parse_result_t result = { 0 };
|
||||
result.options.line = 1;
|
||||
|
||||
VALUE error;
|
||||
|
||||
if (strcmp(opt->script, "-") == 0) {
|
||||
|
@ -2413,7 +2415,10 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
|
||||
if ((*rb_ruby_prism_ptr())) {
|
||||
ruby_opt_init(opt);
|
||||
|
||||
pm_parse_result_t result = { 0 };
|
||||
result.options.line = 1;
|
||||
|
||||
VALUE error;
|
||||
|
||||
if (strcmp(opt->script, "-") == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue