Use rb_encoding * as literal hash of NODE_ENCODING

This reduces dependency on VALUE.
This commit is contained in:
yui-knk 2024-02-21 13:43:17 +09:00 committed by Yuichiro Kaneko
parent 6a0b05f413
commit 7d112b04c7

View File

@ -217,7 +217,7 @@ literal_hash(st_data_t a)
/* Same with NODE_STR */
return rb_parser_str_hash(RNODE_FILE(node)->path);
case NODE_ENCODING:
return rb_node_encoding_val(node);
return (st_index_t)RNODE_ENCODING(node)->enc;
default:
rb_bug("unexpected node: %s", ruby_node_name(type));
}