Skip to content

Commit fc22265

Browse files
committedApr 17, 2023
(CONT-812) Ensure that @alias_of is mutable
1 parent 0e077a3 commit fc22265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎lib/puppet-strings/yard/parsers/puppet/statement.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def initialize(object, file)
170170
case type_expr
171171
when Puppet::Pops::Model::AccessExpression
172172
# TODO: I don't like rebuilding the source from the AST, but AccessExpressions don't expose the original source
173-
@alias_of = "#{PuppetStrings::Yard::Util.ast_to_text(type_expr.left_expr)}["
173+
@alias_of = +"#{PuppetStrings::Yard::Util.ast_to_text(type_expr.left_expr)}[" # alias_of should be mutable so we add a + to the string.
174174
@alias_of << type_expr.keys.map { |key| PuppetStrings::Yard::Util.ast_to_text(key) }.join(', ')
175175
@alias_of << ']'
176176
else

0 commit comments

Comments
 (0)
Please sign in to comment.