[ruby-cvs:57311] nobu:r50162 (trunk): string.c: check before modify

nobu at ruby-lang.org nobu at ruby-lang.org
Sat Apr 4 11:30:28 JST 2015


nobu	2015-04-04 11:30:26 +0900 (Sat, 04 Apr 2015)

  New Revision: 50162

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50162

  Log:
    string.c: check before modify
    
    * string.c (rb_str_setbyte): check the argument first not to
      discard shared string and code range unnecessarily until
      actually changing the contents.  pointed out by headius.

  Modified files:
    trunk/ChangeLog
    trunk/string.c


More information about the ruby-cvs mailing list