Am Montag, den 23.03.2020, 18:13 +0100 schrieb Stig Sandbeck Mathisen:
> Daniel Leidert <dleid...@debian.org> writes:
> 
> > Package: src:ruby-puppet-syntax
> > Followup-For: Bug #952022
> > 
> > The formentioned issue can probably be closed by applying this patch:
> > 
> > --- a/lib/rspec-puppet/support.rb
> > +++ b/lib/rspec-puppet/support.rb
> > @@ -440,7 +440,7 @@
> >      end
> >  
> >      def escape_special_chars(string)
> > -      string.gsub!(/\$/, "\\$")
> > +      string.gsub(/\$/, "\\$")
> >        string
> >      end
> > 
> > But then there are new errors (see below). I'll stop here and leave
> > this to someone more experienced. So if anyone wants to go on, please
> > feel free to do so.
> > 
> > Regards, Daniel
> 
> I think that change turns the subroutine into a noop.
> 
> string.gsub(pattern,replacement) returns the changed string, and does
> not change the original object. The output in this instance is
> discarded.
> 
> string.gsub!(pattern,replacement) modifies the object.
>
> The subroutine then returns the original or changed string.

Thanks. This actually brought me on the right track. I just uploaded the fixed
package.

Regards, Daniel

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to