From 45eee0cd9444634fb9fe9a7a8db5d394658e6c60 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 2 Nov 2023 10:06:03 +0900 Subject: [PATCH] Remove duplicate to_path conversion `rb_file_open_str` calls `FilePathValue`, and the converted result is not used in this function. --- ast.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ast.c b/ast.c index 6d2ca17ca7c7f8..50a54a9f4b2688 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();