Skip to content

Commit

Permalink
Remove duplicate to_path conversion
Browse files Browse the repository at this point in the history
`rb_file_open_str` calls `FilePathValue`, and the converted result is
not used in this function.
  • Loading branch information
nobu committed Nov 2, 2023
1 parent d3ea907 commit 45eee0c
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ast.c
Expand Up @@ -117,7 +117,6 @@ rb_ast_parse_file(VALUE path, VALUE keep_script_lines, VALUE error_tolerant, VAL
rb_ast_t *ast = 0;
rb_encoding *enc = rb_utf8_encoding();

FilePathValue(path);
f = rb_file_open_str(path, "r");
rb_funcall(f, rb_intern("set_encoding"), 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
VALUE vparser = ast_parse_new();
Expand Down

0 comments on commit 45eee0c

Please sign in to comment.