summaryrefslogtreecommitdiff
path: root/array.c
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-24 07:51:05 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-24 07:51:05 +0000
commit96af5360a4089daf90743ad4722e77eff2261145 (patch)
tree1947bc517fbe570b95016009602ad3c3192f24d5 /array.c
parentaab2f788d784ef73dd088f7cc6e258672da0ae59 (diff)
* enum.c (enum_zip): Fix error message
* array.c (take_items): Same, for Array#zip [Bug #7706] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r--array.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/array.c b/array.c
index 6f14b99933..f221a614c9 100644
--- a/array.c
+++ b/array.c
@@ -3047,7 +3047,8 @@ take_items(VALUE obj, long n)
result = rb_ary_new2(n);
args[0] = result; args[1] = (VALUE)n;
if (rb_check_block_call(obj, idEach, 0, 0, take_i, (VALUE)args) == Qundef)
- Check_Type(obj, T_ARRAY);
+ rb_raise(rb_eTypeError, "wrong argument type %s (must respond to :each)",
+ rb_obj_classname(obj));
return result;
}