Use rb_encoding *
as literal hash of NODE_ENCODING
This reduces dependency on VALUE.
This commit is contained in:
parent
6a0b05f413
commit
7d112b04c7
2
parse.y
2
parse.y
@ -217,7 +217,7 @@ literal_hash(st_data_t a)
|
|||||||
/* Same with NODE_STR */
|
/* Same with NODE_STR */
|
||||||
return rb_parser_str_hash(RNODE_FILE(node)->path);
|
return rb_parser_str_hash(RNODE_FILE(node)->path);
|
||||||
case NODE_ENCODING:
|
case NODE_ENCODING:
|
||||||
return rb_node_encoding_val(node);
|
return (st_index_t)RNODE_ENCODING(node)->enc;
|
||||||
default:
|
default:
|
||||||
rb_bug("unexpected node: %s", ruby_node_name(type));
|
rb_bug("unexpected node: %s", ruby_node_name(type));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user