Skip to content

Commit

Permalink
Use rb_ary_entry to skip INT2FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
amomchilov committed Dec 18, 2024
1 parent 21cb293 commit 0b4f69e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/rbs_extension/parserstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ parserstate *alloc_parser(VALUE buffer, lexstate *lexer, int start_pos, int end_
parser_push_typevar_table(parser, true);

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

rbs_constant_id_t id = rbs_constant_pool_insert_shared(
Expand Down

0 comments on commit 0b4f69e

Please sign in to comment.