mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* expand tabs.
This commit is contained in:
parent
5e23b1138f
commit
5c87bb3b90
1 changed files with 2 additions and 2 deletions
4
string.c
4
string.c
|
@ -6518,7 +6518,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
|
||||||
if (buffer_length_or_invalid < 0) {
|
if (buffer_length_or_invalid < 0) {
|
||||||
current_buffer = DATA_PTR(buffer_anchor);
|
current_buffer = DATA_PTR(buffer_anchor);
|
||||||
DATA_PTR(buffer_anchor) = 0;
|
DATA_PTR(buffer_anchor) = 0;
|
||||||
mapping_buffer_free(current_buffer);
|
mapping_buffer_free(current_buffer);
|
||||||
rb_raise(rb_eArgError, "input string invalid");
|
rb_raise(rb_eArgError, "input string invalid");
|
||||||
}
|
}
|
||||||
target_length += current_buffer->used = buffer_length_or_invalid;
|
target_length += current_buffer->used = buffer_length_or_invalid;
|
||||||
|
@ -6535,7 +6535,7 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
|
||||||
|
|
||||||
target = rb_str_new_with_class(source, 0, target_length);
|
target = rb_str_new_with_class(source, 0, target_length);
|
||||||
target_current = RSTRING_PTR(target);
|
target_current = RSTRING_PTR(target);
|
||||||
current_buffer = DATA_PTR(buffer_anchor);
|
current_buffer = DATA_PTR(buffer_anchor);
|
||||||
while (current_buffer) {
|
while (current_buffer) {
|
||||||
memcpy(target_current, current_buffer->space, current_buffer->used);
|
memcpy(target_current, current_buffer->space, current_buffer->used);
|
||||||
target_current += current_buffer->used;
|
target_current += current_buffer->used;
|
||||||
|
|
Loading…
Add table
Reference in a new issue