summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e3b17a6dd..23d5855288 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Feb 7 18:57:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_dup): reverted unneeded change. [ruby-dev:33634]
+
Thu Feb 7 16:33:51 2008 Tanaka Akira <akr@fsij.org>
* io.c (io_reopen): don't change access mode for stdin, stdout and
diff --git a/string.c b/string.c
index 487a863912..a9e90f2848 100644
--- a/string.c
+++ b/string.c
@@ -564,7 +564,9 @@ static VALUE rb_str_replace(VALUE, VALUE);
VALUE
rb_str_dup(VALUE str)
{
- return rb_str_new3(str);
+ VALUE dup = str_alloc(rb_obj_class(str));
+ rb_str_replace(dup, str);
+ return dup;
}