summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-20 09:07:02 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-06-20 09:07:02 +0000
commit67a3f2eebce948c695ae37ee7ebd1a5f2dd9f7a2 (patch)
tree4af2a2f6516deb2d0026ebe36c66ed34c0bfd1c6 /string.c
parent509f805ace7a3118446a2f519b5f81802d48f450 (diff)
merges r23562 and r23564 from trunk into ruby_1_9_1.
-- * string.c (rb_str_partition): should use the converted result. a patch from Marc-Andre Lafortune at [ruby-core:23540]. -- * string.c (rb_str_rpartition): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/string.c b/string.c
index 8e264d53aa..3026de17d8 100644
--- a/string.c
+++ b/string.c
@@ -6645,6 +6645,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) {
@@ -6692,6 +6693,7 @@ rb_str_rpartition(VALUE str, VALUE sep)
rb_raise(rb_eTypeError, "type mismatch: %s given",
rb_obj_classname(sep));
}
+ sep = tmp;
pos = rb_str_sublen(str, pos);
pos = rb_str_rindex(str, sep, pos);
}