summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-27 21:18:29 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-27 21:18:29 +0000
commit456f68f2fd3ee8f0d95641ac98b9550465487c01 (patch)
treee7abc2fba69c946ead28b6bd70857a7c375426e5 /sprintf.c
parent72122dd947cecee1ba0acdde15ce390650ec1963 (diff)
* sprintf.c (GETNAMEARG): remembers named arg is used, to get rid
of too many arguments warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sprintf.c b/sprintf.c
index 58dedd3..8191170 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -123,7 +123,7 @@ sign_bits(int base, const char *p)
(rb_raise(rb_eArgError, "named after unnumbered(%d)", posarg), 0) : \
posarg == -1 ? \
(rb_raise(rb_eArgError, "named after numbered"), 0) : \
- rb_hash_fetch(get_hash(&hash, argc, argv), id))
+ (posarg = -2, rb_hash_lookup(get_hash(&hash, argc, argv), id)))
#define GETNUM(n, val) \
for (; p < end && rb_enc_isdigit(*p, enc); p++) { \