method
indices
ruby latest stable - Class:
Array
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.
indices(...)public
Deprecated; use Array#values_at.
/*
* call-seq:
* array.indexes( i1, i2, ... iN ) -> an_array
* array.indices( i1, i2, ... iN ) -> an_array
*
* Deprecated; use <code>Array#values_at</code>.
*/
static VALUE
rb_ary_indexes(argc, argv, ary)
int argc;
VALUE *argv;
VALUE ary;
{
VALUE new_ary;
long i;
rb_warn("Array#%s is deprecated; use Array#values_at", rb_id2name(rb_frame_last_func()));
new_ary = rb_ary_new2(argc);
for (i=0; i<argc; i++) {
rb_ary_push(new_ary, rb_ary_aref(1, argv+i, ary));
}
return new_ary;
} Related methods
- Instance methods
- &
- *
- +
- -
- <<
- <=>
- ==
- []
- []=
- abbrev
- assoc
- at
- choice
- clear
- collect
- collect!
- combination
- compact
- compact!
- concat
- count
- cycle
- dclone
- delete
- delete_at
- delete_if
- drop
- drop_while
- each
- each_index
- empty?
- eql?
- fetch
- fill
- find_index
- first
- flatten
- flatten!
- frozen?
- hash
- include?
- index
- indexes
- indices
- initialize_copy
- insert
- inspect
- join
- last
- length
- map
- map!
- nitems
- pack
- permutation
- pop
- pretty_print
- pretty_print_cycle
- product
- push
- rassoc
- reject
- reject!
- replace
- reverse
- reverse!
- reverse_each
- rindex
- select
- shelljoin
- shift
- shuffle
- shuffle!
- size
- slice
- slice!
- sort
- sort!
- take
- take_while
- to_a
- to_ary
- to_s
- to_yaml
- transpose
- uniq
- uniq!
- unshift
- values_at
- yaml_initialize
- zip
- |
- Class methods
- []
- new