Array#each_with_index

Rubyの練習。要素だけではなくインデクス付きのイテレーション

ary = [ "Alice", "Bobby", "Chris" ]
ary.each_with_index do |e, i|
  puts "#{i}: #{e}"
end

実行結果はこうなります。

0: Alice
1: Bobby
2: Chris

疑問: ri Array#eachは表示されますが、ri Array#each_with_indexは表示されません。Enumerableをincludeしているって情報は持っているのですから、ri Array#each_with_indexでも表示されてほしいなあ、と思いました。→id:walf443さんから、Refeなら表示されますよという情報をいただきました。ありがとうございます。