Project

General

Profile

Feature #11782

String#+@ and String#-@

Added by ko1 (Koichi Sasada) over 4 years ago. Updated over 4 years ago.

Status:
Assigned
Priority:
Normal
Target version:
-
[ruby-core:71898]

Description

Matz said

In fact, my best choice is introducing String#+ that returns a mutable copy of a string.
[ruby-core:71879] [Ruby trunk - Bug #11759]

So that this is a ticket for that.
I'll commit it ASAP to check this methods before 2.3.

Specification:

  • +'foo' returns modifiable string.
  • -'foo' returns frozen string (because wasters will freeze below 0 degree in Celsius).

Also available in: Atom PDF