diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-14 10:19:31 -0500 |
|---|---|---|
| committer | Jemma Issroff <jemmaissroff@gmail.com> | 2023-12-14 11:14:45 -0500 |
| commit | 8e1c148fd90b2c32044ef310a0a312bca89c6fea (patch) | |
| tree | 338bbf5d1e2e256e8faf5b9413d10fbb5c90984c /test/ruby | |
| parent | a18819e65fa2dd3135909df81534937dadafb6ab (diff) | |
[PRISM] Use frozen flag on StringNode
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 6a942cfff1..7bd63eb611 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -607,6 +607,16 @@ module Prism def test_StringNode assert_prism_eval('"pit"') + assert_prism_eval('"a".frozen?') + + frozen_source = <<-CODE + # frozen_string_literal: true + "a".frozen? + CODE + ruby_eval = RubyVM::InstructionSequence.compile(frozen_source).eval + prism_eval = RubyVM::InstructionSequence.compile_prism(frozen_source).eval + + assert_equal ruby_eval, prism_eval end def test_SymbolNode |
