summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 06:22:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-08 06:22:51 +0000
commit3b2e898c148db562b57af7954bbfaf961d3b6267 (patch)
tree22470ff9bb6d7acaa39961f559e0f4096911604d /sprintf.c
parent07b5db25da3e3567f62cfa602bef5dd071a3b91c (diff)
* io.c (io_fwrite): change dereference for cosmetic reason.
* sprintf.c (rb_f_sprintf): [ruby-dev:25104] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7504 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 38283919e6..9ab87f251c 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;