diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-27 09:27:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-27 09:27:47 +0000 |
commit | d0fa578cdcb041ec3e42d8bcba0bfcf9984def6d (patch) | |
tree | a59362bd849e66a7b5556245b8a42fd2c6cfb110 /object.c | |
parent | 9473f86fb0ca396adaccf151874604faf47d852e (diff) | |
download | ruby-d0fa578cdcb041ec3e42d8bcba0bfcf9984def6d.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |