summaryrefslogtreecommitdiff
path: root/range.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-03 05:22:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-03 05:22:18 +0000
commitf7fb4e00f721a9d0520b0bbeab687d122f6759ff (patch)
treeb2ef084edd5e79d481ad9903babb480db227c4a2 /range.c
parent1c7f75793d0c82acbc8742a8bfffd7bda5fc6ceb (diff)
downloadruby-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/range.c b/range.c
index 3fc193501b..95b1b92053 100644
--- a/range.c
+++ b/range.c
@@ -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;
}