diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-03 05:22:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-12-03 05:22:18 +0000 |
commit | f7fb4e00f721a9d0520b0bbeab687d122f6759ff (patch) | |
tree | b2ef084edd5e79d481ad9903babb480db227c4a2 /range.c | |
parent | 1c7f75793d0c82acbc8742a8bfffd7bda5fc6ceb (diff) | |
download | ruby-f7fb4e00f721a9d0520b0bbeab687d122f6759ff.tar.gz |
range.c: infected by the receiver
* 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/trunk@52868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'range.c')
-rw-r--r-- | range.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1074,7 +1074,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; } @@ -1092,7 +1092,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; } |