Skip to content

Commit 4153580

Browse files
committed
Use rb_ary_entry to skip INT2FIX
1 parent 888e33d commit 4153580

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/rbs_extension/parserstate.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ parserstate *alloc_parser(VALUE buffer, lexstate *lexer, int start_pos, int end_
353353
parser_push_typevar_table(parser, true);
354354

355355
for (long i = 0; i < rb_array_len(variables); i++) {
356-
VALUE index = INT2FIX(i);
357-
VALUE symbol = rb_ary_aref(1, &index, variables);
356+
VALUE symbol = rb_ary_entry(variables, i);
358357
VALUE name = rb_sym2str(symbol);
359358

360359
rbs_constant_id_t id = rbs_constant_pool_insert_shared(

0 commit comments

Comments
 (0)