diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-26 07:23:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-10-26 07:23:23 +0000 |
commit | 38828e61970293b1be6113413cbce96294280953 (patch) | |
tree | 57a01309af17a79bcf3f47f2bb95cf135fa955ca /array.c | |
parent | 9016f61ef226ec0acf6cfc7ddc429257312ca1db (diff) | |
download | ruby-38828e61970293b1be6113413cbce96294280953.tar.gz |
common conversion functions
* array.c (rb_to_array_type): make public to share common code
internally.
* hash.c (rb_to_hash_type): make public to share common code
internally.
* symbol.c (rb_to_symbol_type): make public to share common code
internally.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'array.c')
-rw-r--r-- | array.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -641,11 +641,12 @@ rb_assoc_new(VALUE car, VALUE cdr) return rb_ary_new3(2, car, cdr); } -static VALUE -to_ary(VALUE ary) +VALUE +rb_to_array_type(VALUE ary) { return rb_convert_type_with_id(ary, T_ARRAY, "Array", idTo_ary); } +#define to_ary rb_to_array_type VALUE rb_check_array_type(VALUE ary) |