Project

General

Profile

« Previous | Next » 

Revision 8c0b2a28

Added by nobu (Nobuyoshi Nakada) about 10 years ago

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e