* string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6fa5855a8
commit
8b95a0df1b
@ -1,3 +1,7 @@
|
|||||||
|
Wed Apr 8 17:29:29 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* string.c (rb_str_chop_bang): reset coderange. [ruby-core:23155]
|
||||||
|
|
||||||
Wed Apr 8 14:00:04 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Apr 8 14:00:04 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* lib/mkmf.rb (what_type?): fixed typo, and refined for member of
|
* lib/mkmf.rb (what_type?): fixed typo, and refined for member of
|
||||||
|
2
string.c
2
string.c
@ -5935,7 +5935,7 @@ rb_str_chop_bang(VALUE str)
|
|||||||
{
|
{
|
||||||
if (RSTRING_LEN(str) > 0) {
|
if (RSTRING_LEN(str) > 0) {
|
||||||
long len;
|
long len;
|
||||||
str_modify_keep_cr(str);
|
rb_str_modify(str);
|
||||||
len = chopped_length(str);
|
len = chopped_length(str);
|
||||||
STR_SET_LEN(str, len);
|
STR_SET_LEN(str, len);
|
||||||
RSTRING_PTR(str)[len] = '\0';
|
RSTRING_PTR(str)[len] = '\0';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user