diff options
author | Kevin Newton <kddnewton@gmail.com> | 2024-04-29 15:31:41 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2024-05-01 12:34:29 -0400 |
commit | cfe7019ef517804e0b36c5beeb520191d7eb9b52 (patch) | |
tree | a8d51ad7d9c7be4dbc6ec695115452ab4cb20c74 /test/prism/snapshots/seattlerb/heredoc_nested.txt | |
parent | b6fa18fbe90c63b2979a4f1f8aecab1de4373664 (diff) | |
download | ruby-cfe7019ef517804e0b36c5beeb520191d7eb9b52.tar.gz |
[ruby/prism] Match CRuby interpolation semantics
If a single string that is a static literal is interpolated, it
does not impact whether or not the parent is a static literal. In
this way, if you have something like a regular expression that
interpolates a string literal, it's possible that you will end up
pushing just a single regexp onto the stack as opposed to calling
out to toregexp.
https://github.com/ruby/prism/commit/4f096c2257
Diffstat (limited to 'test/prism/snapshots/seattlerb/heredoc_nested.txt')
-rw-r--r-- | test/prism/snapshots/seattlerb/heredoc_nested.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/prism/snapshots/seattlerb/heredoc_nested.txt b/test/prism/snapshots/seattlerb/heredoc_nested.txt index 26d533a33d..a2322b9632 100644 --- a/test/prism/snapshots/seattlerb/heredoc_nested.txt +++ b/test/prism/snapshots/seattlerb/heredoc_nested.txt @@ -7,7 +7,7 @@ ├── flags: ∅ ├── elements: (length: 2) │ ├── @ InterpolatedStringNode (location: (1,1)-(1,4)) - │ │ ├── flags: ∅ + │ │ ├── flags: mutable │ │ ├── opening_loc: (1,1)-(1,4) = "<<A" │ │ ├── parts: (length: 3) │ │ │ ├── @ EmbeddedStatementsNode (location: (2,0)-(2,6)) @@ -16,7 +16,7 @@ │ │ │ │ │ @ StatementsNode (location: (2,2)-(2,5)) │ │ │ │ │ └── body: (length: 1) │ │ │ │ │ └── @ StringNode (location: (2,2)-(2,5)) - │ │ │ │ │ ├── flags: ∅ + │ │ │ │ │ ├── flags: frozen │ │ │ │ │ ├── opening_loc: (2,2)-(2,5) = "<<B" │ │ │ │ │ ├── content_loc: (3,0)-(4,0) = "b\n" │ │ │ │ │ ├── closing_loc: (4,0)-(5,0) = "B\n" |