Bug #14416
closedNet::POPMail methods modify frozen literal when using default arg
Description
Net::POPMail #pop, #top, and #header can modify their "dest" argument. Problem is it has a default value of '', and so FrozenError can be thrown.
Problem methods start here:
https://github.com/ruby/ruby/blob/582951e2c8995d6bab5ddaf98cd3816310f8d506/lib/net/pop.rb#L802
Updated by normalperson (Eric Wong) almost 7 years ago
mzimme@gmail.com wrote:
Net::POPMail #pop, #top, and #header can modify their "dest" argument. Problem is it has a default value of '', and so FrozenError can be thrown.
Thanks, will fix.
Updated by Anonymous almost 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r62099.
net/pop: make modified strings mutable
Thanks to Michael Zimmerman for the bug report
- lib/net/pop.rb: make modified strings mutable
[ruby-core:85210] [Bug #14416] - test/net/pop/test_pop.rb: new test
Updated by tgxworld (Guo Xiang Tan) over 6 years ago
Anonymous wrote:
Applied in changeset trunk|r62099.
net/pop: make modified strings mutable
Thanks to Michael Zimmerman for the bug report
- lib/net/pop.rb: make modified strings mutable
[ruby-core:85210] [Bug #14416]- test/net/pop/test_pop.rb: new test
Can I check if this patch will be backported to Ruby 2.5?
Updated by normalperson (Eric Wong) over 6 years ago
- Status changed from Closed to Open
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: REQUIRED
Updated by normalperson (Eric Wong) over 6 years ago
- Status changed from Open to Closed
Updated by nagachika (Tomoyuki Chikanaga) over 6 years ago
- Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: REQUIRED to 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: DONE
ruby_2_5 r64443 merged revision(s) 62099.