summaryrefslogtreecommitdiff
path: root/ext/tk
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-15 07:40:25 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-03-15 07:40:25 +0000
commit5fd61519a5727c66e29546dc4b73ce07004c5fb0 (patch)
tree175ac267283cf17f2350ec1bef9259ebcb5f5d07 /ext/tk
parent44166b6011a9c633616d7c8a31200b94c5a5b871 (diff)
* ext/tk/tkutil.c (ary2list): give wrong arguments to hash2kv()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk')
-rw-r--r--ext/tk/tkutil.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/tk/tkutil.c b/ext/tk/tkutil.c
index 3a403e74f5..9de7aef6b8 100644
--- a/ext/tk/tkutil.c
+++ b/ext/tk/tkutil.c
@@ -8,7 +8,7 @@
************************************************/
-#define TKUTIL_RELEASE_DATE "2005-03-07"
+#define TKUTIL_RELEASE_DATE "2005-03-15"
#include "ruby.h"
#include "rubysig.h"
@@ -229,6 +229,7 @@ static VALUE ary2list2 _((VALUE, VALUE, VALUE));
static VALUE hash2list _((VALUE, VALUE));
static VALUE hash2list_enc _((VALUE, VALUE));
static VALUE hash2kv _((VALUE, VALUE, VALUE));
+static VALUE hash2kv_enc _((VALUE, VALUE, VALUE));
static VALUE
ary2list(ary, enc_flag, self)
@@ -262,7 +263,11 @@ ary2list(ary, enc_flag, self)
case T_HASH:
/* RARRAY(dst)->ptr[RARRAY(dst)->len++] = hash2list(val, self); */
- val = hash2kv(val, enc_flag, self);
+ if (RTEST(enc_flag)) {
+ val = hash2kv_enc(val, Qnil, self);
+ } else {
+ val = hash2kv(val, Qnil, self);
+ }
size2 = RARRAY(val)->len;
for(idx2 = 0; idx2 < size2; idx2++) {
val2 = RARRAY(val)->ptr[idx2];