mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Introduce NODE_ENCODING
`__ENCODING__ `was managed by `NODE_LIT` with Encoding object. Introduce `NODE_ENCODING` for 1. `__ENCODING__` is detectable from AST Node. 2. Reduce dependency Ruby object for parse.y
This commit is contained in:
parent
68b9a32a62
commit
9b40f42c22
7 changed files with 63 additions and 3 deletions
|
@ -1008,3 +1008,9 @@ rb_node_file_path_val(const NODE *node)
|
|||
{
|
||||
return rb_str_new_parser_string(RNODE_FILE(node)->path);
|
||||
}
|
||||
|
||||
VALUE
|
||||
rb_node_encoding_val(const NODE *node)
|
||||
{
|
||||
return rb_enc_from_encoding(RNODE_ENCODING(node)->enc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue