Actions
Bug #15616
closedChained destructive methods fail when using +@ to unfreeze a frozen string
Bug #15616:
Chained destructive methods fail when using +@ to unfreeze a frozen string
Description
Using the +@ syntax to unfreeze a string does not work when chaining destructive methods
Consider the following;
foo = "bar".freeze
+foo.gsub!("bar", "car")
This raises;
FrozenError: can't modify frozen String
However, I would have expected this to work since +@ should return a duplicated mutable string.
Actions