Project

General

Profile

Bug #14416

Net::POPMail methods modify frozen literal when using default arg

Added by Mzim (Michael Zimmerman) over 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
[ruby-core:85210]

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) over 2 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.

#2

Updated by Anonymous over 2 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) about 2 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?

#4

Updated by normalperson (Eric Wong) about 2 years ago

  • Backport changed from 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN to 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: REQUIRED
  • Status changed from Closed to Open
#5

Updated by normalperson (Eric Wong) about 2 years ago

  • Status changed from Open to Closed

Updated by nagachika (Tomoyuki Chikanaga) almost 2 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.

Also available in: Atom PDF