diff options
author | Alan Wu <[email protected]> | 2024-02-01 17:11:32 -0500 |
---|---|---|
committer | <[email protected]> | 2024-02-01 22:11:32 +0000 |
commit | 8d33be9833dd6a8851948762065db6fab051ad8c () | |
tree | 30a2a0a3307aef6842f21e9ef6a1cabff76a9f4e | |
parent | 770b5499a550956001b879abb5bbd205eabda19f (diff) |
[PRISM] Respect string encoding override in array literals
Fixes `TestZlibGzipReader#test_gets2`, `Psych_Unit_Tests#test_spec_explicit_families`, and many failures in `test_unicode_normalize.rb`.
-rw-r--r-- | prism_compile.c | 2 | ||||
-rw-r--r-- | test/ruby/test_compile_prism.rb | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -405,7 +405,7 @@ pm_static_literal_value(const pm_node_t *node, const pm_scope_node_t *scope_node return INT2FIX(source_line); } case PM_STRING_NODE: - return parse_string(&((pm_string_node_t *) node)->unescaped, parser); case PM_SYMBOL_NODE: return ID2SYM(parse_string_symbol((pm_symbol_node_t *)node, parser)); case PM_TRUE_NODE: @@ -834,6 +834,13 @@ module Prism # Test keyword splat inside of array assert_prism_eval("[**{x: 'hello'}]") end def test_AssocNode |