mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[Bug #19902] Update the coderange regarding the changed region
This commit is contained in:
parent
f0d8278607
commit
6b66b5fded
3 changed files with 66 additions and 0 deletions
|
@ -7,8 +7,18 @@ bug_str_set_len(VALUE str, VALUE len)
|
|||
return str;
|
||||
}
|
||||
|
||||
static VALUE
|
||||
bug_str_append(VALUE str, VALUE addendum)
|
||||
{
|
||||
StringValue(addendum);
|
||||
rb_str_modify_expand(str, RSTRING_LEN(addendum));
|
||||
memcpy(RSTRING_END(str), RSTRING_PTR(addendum), RSTRING_LEN(addendum));
|
||||
return str;
|
||||
}
|
||||
|
||||
void
|
||||
Init_string_set_len(VALUE klass)
|
||||
{
|
||||
rb_define_method(klass, "set_len", bug_str_set_len, 1);
|
||||
rb_define_method(klass, "append", bug_str_append, 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue