Actions
Bug #38329
closedAvoid string building with << which breaks with frozen strings
Description
When dealing with frozen strings, << breaks. Using += unfreezes the string and is thus safer.
[1] pry(main)> msg = 'x'.freeze => "x" [2] pry(main)> msg.frozen? => true [3] pry(main)> msg << 'y' FrozenError: can't modify frozen String: "x" (FrozenError) from (pry):3:in `__pry__' [4] pry(main)> msg += 'y' => "xy" [5] pry(main)> msg.frozen? => false
Updated by The Foreman Bot 29 days ago
- Status changed from New to Ready For Testing
- Assignee set to Ewoud Kohl van Wijngaarden
- Pull request https://github.com/theforeman/foreman/pull/10502 added
Updated by Ewoud Kohl van Wijngaarden 19 days ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|e0635fd5e0aa27c60ebc293db97af34638364b60.
Actions