summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 03:13:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-10 03:13:34 +0000
commit3d3a0d88c9fe73b911f0a0ba2a96b771740b48db (patch)
treeda807224de53d03bc948ab3ca07ee1366a3b624c /string.c
parent16095eb187c49a6462a0c7d8a698e1800a49d402 (diff)
string.c: use str_duplicate
* string.c (rb_str_resurrect): use str_duplicate(), which does completely same. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 6512fe4092..5cdf7a3620 100644
--- a/string.c
+++ b/string.c
@@ -1006,7 +1006,7 @@ rb_str_resurrect(VALUE str)
RUBY_DTRACE_STRING_CREATE(RSTRING_LEN(str),
rb_sourcefile(), rb_sourceline());
}
- return str_replace(str_alloc(rb_cString), str);
+ return str_duplicate(rb_cString, str);
}
/*