summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/ruby.c b/ruby.c
index 2c7e3285a7..a0982e86d9 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2099,27 +2099,6 @@ process_script(ruby_cmdline_options_t *opt)
}
/**
- * Call ruby_opt_init to set up the global state based on the command line
- * options, and then warn if prism is enabled and the experimental warning
- * category is enabled.
- */
-static void
-prism_opt_init(ruby_cmdline_options_t *opt)
-{
- ruby_opt_init(opt);
-
- if (rb_warning_category_enabled_p(RB_WARN_CATEGORY_EXPERIMENTAL)) {
- rb_category_warn(
- RB_WARN_CATEGORY_EXPERIMENTAL,
- "The compiler based on the Prism parser is currently experimental "
- "and compatibility with the compiler based on parse.y is not yet "
- "complete. Please report any issues you find on the `ruby/prism` "
- "issue tracker."
- );
- }
-}
-
-/**
* Process the command line options and parse the script into the given result.
* Raise an error if the script cannot be parsed.
*/
@@ -2147,14 +2126,14 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result)
pm_options_command_line_set(options, command_line);
pm_options_filepath_set(options, "-");
- prism_opt_init(opt);
+ ruby_opt_init(opt);
error = pm_parse_stdin(result);
}
else if (opt->e_script) {
command_line |= PM_OPTIONS_COMMAND_LINE_E;
pm_options_command_line_set(options, command_line);
- prism_opt_init(opt);
+ ruby_opt_init(opt);
result->node.coverage_enabled = 0;
error = pm_parse_string(result, opt->e_script, rb_str_new2("-e"));
}
@@ -2166,7 +2145,7 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result)
// line options. We do it in this order so that if the main script fails
// to load, it doesn't require files required by -r.
if (NIL_P(error)) {
- prism_opt_init(opt);
+ ruby_opt_init(opt);
error = pm_parse_file(result, opt->script_name);
}