Skip to content

Commit

Permalink
Supress type cast warning from long int to VALUE in parse.y
Browse files Browse the repository at this point in the history
  • Loading branch information
jinroq committed Jan 8, 2024
1 parent b3d6128 commit 109eebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parse.y
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ node_cdhash_hash(VALUE a)
switch (type) {
case NODE_INTEGER:
val = rb_node_integer_literal_val(node);
return (FIXNUM_P(val) ? val : FIX2LONG(rb_big_hash(val)));
return (FIXNUM_P(val) ? val : (VALUE)FIX2LONG(rb_big_hash(val)));
case NODE_FLOAT:
val = rb_node_float_literal_val(node);
return rb_dbl_long_hash(RFLOAT_VALUE(val));
Expand Down

0 comments on commit 109eebf

Please sign in to comment.