Use ID without cache and fix conversion of offset

This commit is contained in:
Nobuyoshi Nakada 2024-02-16 13:12:26 +09:00
Родитель e0d068aa9c
Коммит a64e93a896
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 3582D74E1FEE4465
1 изменённых файлов: 1 добавлений и 1 удалений

2
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);
}
}