[PRISM] Respect PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING flag
This commit is contained in:
parent
14bb376b79
commit
079161e1ba
Notes:
git
2024-08-29 14:31:20 +00:00
@ -505,7 +505,7 @@ parse_regexp_flags(const pm_node_t *node)
|
|||||||
static rb_encoding *
|
static rb_encoding *
|
||||||
parse_regexp_encoding(const pm_scope_node_t *scope_node, const pm_node_t *node)
|
parse_regexp_encoding(const pm_scope_node_t *scope_node, const pm_node_t *node)
|
||||||
{
|
{
|
||||||
if (PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
|
if (PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_FORCED_BINARY_ENCODING) || PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_ASCII_8BIT)) {
|
||||||
return rb_ascii8bit_encoding();
|
return rb_ascii8bit_encoding();
|
||||||
}
|
}
|
||||||
else if (PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
|
else if (PM_NODE_FLAG_P(node, PM_REGULAR_EXPRESSION_FLAGS_UTF_8)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user