[ruby-core:87510] [Ruby trunk Bug#14416] Net::POPMail methods modify frozen literal when using default arg

From: tgx_world@...
Date: 2018-06-19 02:42:28 UTC
List: ruby-core #87510
Issue #14416 has been updated by tgxworld (Guo Xiang Tan).


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



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?

----------------------------------------
Bug #14416: Net::POPMail methods modify frozen literal when using default arg
https://bugs.ruby-lang.org/issues/14416#change-72514

* Author: Mzim (Michael Zimmerman)
* Status: Closed
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin17]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
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



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next