From a64e93a8964f970015323b3a02e74ab04e31bc23 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 16 Feb 2024 13:12:26 +0900 Subject: [PATCH] Use ID without cache and fix conversion of offset --- ruby.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.c b/ruby.c index 31239dcde2..b3d7a01dcc 100644 --- a/ruby.c +++ b/ruby.c @@ -2119,7 +2119,7 @@ prism_script(ruby_cmdline_options_t *opt, pm_parse_result_t *result) if ((result->parser.start + offset < result->parser.end) && result->parser.start[offset] == '\r') offset++; if ((result->parser.start + offset < result->parser.end) && result->parser.start[offset] == '\n') offset++; - rb_funcall(file, rb_intern("seek"), 2, LONG2NUM(offset), INT2FIX(SEEK_SET)); + rb_funcall(file, rb_intern_const("seek"), 2, SIZET2NUM(offset), INT2FIX(SEEK_SET)); rb_define_global_const("DATA", file); } }