aboutsummaryrefslogtreecommitdiffstats
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 05:32:26 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 05:32:26 +0000
commita0b3060708a3422d2aa4046c0f6595cd94728ba9 (patch)
treecca075b063a60fa1ceaeb1f2d3faff9f60c9bfcf /sprintf.c
parent87a77c71748c1b97e16f141709e9679f37efc441 (diff)
downloadruby-a0b3060708a3422d2aa4046c0f6595cd94728ba9.tar.gz
* sprintf.c (rb_f_sprintf): [ruby-dev:25104]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sprintf.c b/sprintf.c
index 16f9c35a3e..97c392816b 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -249,6 +249,7 @@ rb_f_sprintf(argc, argv)
fmt = GETNTHARG(0);
if (OBJ_TAINTED(fmt)) tainted = 1;
StringValue(fmt);
+ fmt = rb_str_new4(fmt);
p = RSTRING(fmt)->ptr;
end = p + RSTRING(fmt)->len;
blen = 0;