aboutsummaryrefslogtreecommitdiffstats
path: root/range.c
diff options
context:
space:
mode:
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;
}