mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00
merge revision(s) 52868: [Backport #11767]
* range.c (range_to_s): should be infected by the receiver. str2 infects by appending. [ruby-core:71811] [Bug #11767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@52875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1745d2584a
commit
0399a3d47b
4 changed files with 20 additions and 5 deletions
4
range.c
4
range.c
|
@ -1078,7 +1078,7 @@ range_to_s(VALUE range)
|
|||
str = rb_str_dup(str);
|
||||
rb_str_cat(str, "...", EXCL(range) ? 3 : 2);
|
||||
rb_str_append(str, str2);
|
||||
OBJ_INFECT(str, str2);
|
||||
OBJ_INFECT(str, range);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
@ -1096,7 +1096,7 @@ inspect_range(VALUE range, VALUE dummy, int recur)
|
|||
str = rb_str_dup(str);
|
||||
rb_str_cat(str, "...", EXCL(range) ? 3 : 2);
|
||||
rb_str_append(str, str2);
|
||||
OBJ_INFECT(str, str2);
|
||||
OBJ_INFECT(str, range);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue