Project

General

Profile

Actions

Bug #14416

closed

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

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

Status:
Closed
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) almost 7 years ago

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.

Actions #2

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

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

Can I check if this patch will be backported to Ruby 2.5?

Actions #4

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
Actions #5

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0