summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/string.c b/string.c
index 3d864e54b5..246599d050 100644
--- a/string.c
+++ b/string.c
@@ -6876,6 +6876,7 @@ rb_str_partition(VALUE str, VALUE sep)
rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_obj_classname(sep));
}
+ sep = tmp;
pos = rb_str_index(str, sep, 0);
}
if (pos < 0) {