summaryrefslogtreecommitdiff
path: root/enum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 14:47:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-16 14:47:38 +0000
commit118838ad3a808f1e22ff83ec2718b409fb251fbc (patch)
treea28502ea99cd963496b8beb6fdfbf48ea42b7145 /enum.c
parentfcbd13b10ae48b326a573662f91b7b76e4da8334 (diff)
enum.c: fix condition to recycle block argument
* enum.c (dont_recycle_block_arg): fix condition to recycle block argument. lambda with rest can get internal array directly. [ruby-core:62060] [Bug #9749] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45603 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enum.c')
-rw-r--r--enum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/enum.c b/enum.c
index 8826bf3..8496636 100644
--- a/enum.c
+++ b/enum.c
@@ -2058,7 +2058,7 @@ enum_each_entry(int argc, VALUE *argv, VALUE obj)
return obj;
}
-#define dont_recycle_block_arg(arity) ((arity) == 1 || (arity) == -1)
+#define dont_recycle_block_arg(arity) ((arity) == 1 || (arity) < 0)
#define nd_no_recycle u2.value
static VALUE