aboutsummaryrefslogtreecommitdiffstats
path: root/object.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 09:27:47 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 09:27:47 +0000
commitcbe9334756dae440b5a984287f39bea03430106c (patch)
treea59362bd849e66a7b5556245b8a42fd2c6cfb110 /object.c
parent719fa6cece3160ef77163364334d8dd12364c116 (diff)
downloadruby-cbe9334756dae440b5a984287f39bea03430106c.tar.gz
array.c: rb_check_to_array
* array.c (rb_check_to_array): conversion to array by to_a method. returns nil if not possible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index 48c97b6f36..05502833e5 100644
--- a/object.c
+++ b/object.c
@@ -3595,7 +3595,7 @@ rb_Array(VALUE val)
VALUE tmp = rb_check_array_type(val);
if (NIL_P(tmp)) {
- tmp = rb_check_convert_type_with_id(val, T_ARRAY, "Array", idTo_a);
+ tmp = rb_check_to_array(val);
if (NIL_P(tmp)) {
return rb_ary_new3(1, val);
}