dumping ground for random patches and texts
 help / color / mirror / Atom feed
* [PATCH] string.c (str_uminus): update doc for deduplication
@ 2017-03-08 21:23 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-03-08 21:23 UTC (permalink / raw)
  To: spew

As of r57698, String#-@ can return pre-existing strings.
---
 string.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/string.c b/string.c
index e95ed2be69..c002c9c24e 100644
--- a/string.c
+++ b/string.c
@@ -2520,8 +2520,8 @@ str_uplus(VALUE str)
  *
  * If the string is frozen, then return the string itself.
  *
- * If the string is not frozen, then duplicate the string
- * freeze it and return it.
+ * If the string is not frozen, return a frozen, possibly pre-existing
+ * copy of it.
  */
 static VALUE
 str_uminus(VALUE str)
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-08 21:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 21:23 [PATCH] string.c (str_uminus): update doc for deduplication Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).