summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-20 20:44:49 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-07-20 20:44:49 +0000
commitf262909cba89361e786a7e097908d5923fff61c3 (patch)
treebbb28192f5115f6394ab8e30aa5abaccf4096d28 /hash.c
parent32ee210345c56347476bb2b2a166fafaf1f61e3f (diff)
* hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bit
platform. it's introduced by r42039 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index 447d73feb1..3c448c0b0e 100644
--- a/hash.c
+++ b/hash.c
@@ -2223,7 +2223,7 @@ rb_hash_flatten(int argc, VALUE *argv, VALUE hash)
ary = rb_ary_new_capa(RHASH_SIZE(hash) * 2);
rb_hash_foreach(hash, flatten_i, ary);
if (argc) {
- int level = FIX2INT(*argv) - 1;
+ int level = NUM2INT(*argv) - 1;
if (level > 0) {
*argv = INT2FIX(level);
rb_funcall2(ary, rb_intern("flatten!"), argc, argv);