Feature #3897
closedPathname sub_ext! method
Description
=begin
There is already sub_ext method for Pathname, but there is no sub_ext! to modify the object itself instead of returning a new one.
=end
Updated by now (Nikolai Weibull) over 14 years ago
=begin
On Sat, Oct 2, 2010 at 09:41, Semyon Perepelitsa [email protected] wrote:
Feature #3897: Pathname sub_ext! method
http://redmine.ruby-lang.org/issues/show/3897Author: Semyon Perepelitsa
Status: Open, Priority: Low
Category: libThere is already sub_ext method for Pathname, but there is no sub_ext! to modify the object itself instead of returning a new one.
Pathname is a value object so having methods that modify it is, well,
rather a big no-no.
http://c2.com/cgi/wiki?ValueObject
(Note how the article uses strings as an example, which sadly aren’t
immutable in Ruby.)
=end
Updated by akr (Akira Tanaka) about 13 years ago
- Description updated (diff)
- Status changed from Open to Rejected
Pathname is immutable as commented.