ruby-changes:60187
From: Chelsea <ko1@a...>
Date: Wed, 26 Feb 2020 03:43:43 +0900 (JST)
Subject: [ruby-changes:60187] 672213ef1c (master): Document that Array#index and find_index are aliases [ci skip]
https://git.ruby-lang.org/ruby.git/commit/?id=672213ef1c From 672213ef1ca2b71312084057e27580b340438796 Mon Sep 17 00:00:00 2001 From: "Chelsea Corvus (Battell)" <chelsea.battell@g...> Date: Tue, 25 Feb 2020 13:43:17 -0500 Subject: Document that Array#index and find_index are aliases [ci skip] diff --git a/array.c b/array.c index c1f8071..d5650cf 100644 --- a/array.c +++ b/array.c @@ -1774,6 +1774,8 @@ rb_ary_fetch(int argc, VALUE *argv, VALUE ary) https://github.com/ruby/ruby/blob/trunk/array.c#L1774 * a.index("b") #=> 1 * a.index("z") #=> nil * a.index {|x| x == "b"} #=> 1 + * + * Array#index is an alias for Array#find_index. */ static VALUE -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/