rubyのfor文にはeach_index的なものはないのでしょうか? Dec 21, 2017 pythonのfor文 ary = ["taguti","fkoji"] for i in range(len(ary)): print(i) rubyの場合はeach_index ary = ["taguti","fkoji"] ary.each_index{|i| p i} rubyのfor文にそのような機能はあるのでしょうか? for i in ary.length p i# --- NG