aboutsummaryrefslogtreecommitdiffstats
path: root/ast.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-02 10:06:03 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2023-11-02 10:06:03 +0900
commit45eee0cd9444634fb9fe9a7a8db5d394658e6c60 (patch)
tree025e9ff11b7373e7bda5b6457315a350c49d1d0e /ast.c
parentd3ea9070bbbf04749e5fcd8339d71a9e73a86cfb (diff)
downloadruby-45eee0cd9444634fb9fe9a7a8db5d394658e6c60.tar.gz
Remove duplicate to_path conversion
`rb_file_open_str` calls `FilePathValue`, and the converted result is not used in this function.
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/ast.c b/ast.c
index 6d2ca17ca7..50a54a9f4b 100644
--- a/ast.c
+++ b/ast.c
@@ -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();