ruby-changes:45740
From: normal <ko1@a...>
Date: Thu, 9 Mar 2017 06:24:29 +0900 (JST)
Subject: [ruby-changes:45740] normal:r57813 (trunk): string.c (str_uminus): update doc for deduplication
normal 2017-03-09 06:24:24 +0900 (Thu, 09 Mar 2017) New Revision: 57813 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57813 Log: string.c (str_uminus): update doc for deduplication As of r57698, String#-@ can return pre-existing strings. Modified files: trunk/string.c Index: string.c =================================================================== --- string.c (revision 57812) +++ string.c (revision 57813) @@ -2520,8 +2520,8 @@ str_uplus(VALUE str) https://github.com/ruby/ruby/blob/trunk/string.c#L2520 * * 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) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/