Project

General

Profile

Bug #14416

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

Added by Mzim (Michael Zimmerman) over 1 year ago. Updated about 1 year 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

Associated revisions

Revision 7830a950
Added by normal over 1 year ago

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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 62099
Added by normalperson (Eric Wong) over 1 year ago

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

Revision 62099
Added by normal over 1 year ago

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

Revision 3993fbb5
Added by nagachika (Tomoyuki Chikanaga) about 1 year ago

merge revision(s) 62099: [Backport #14416]

    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

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@64443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 64443
Added by nagachika (Tomoyuki Chikanaga) about 1 year ago

merge revision(s) 62099: [Backport #14416]

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

History

Updated by normalperson (Eric Wong) over 1 year 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 1 year 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 1 year 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) over 1 year 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) over 1 year ago

  • Status changed from Open to Closed

Updated by nagachika (Tomoyuki Chikanaga) about 1 year 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