From 9fb9dfecf8783de5fb61f4a5ab51237d848ff2d2 Mon Sep 17 00:00:00 2001 From: yugui Date: Sat, 20 Jun 2009 09:07:02 +0000 Subject: 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: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- string.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'string.c') diff --git a/string.c b/string.c index 8e264d53a..3026de17d 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); } -- cgit