Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
イテレータコードRubyEXに変数を配置する方法:(1,2,3).select { |v| puts v > 2}
(1,2,3).select { |v| puts v > 2}
構文エラーのようです、私はあなたがこのようなものが欲しいと思います
[1,2,3].select { |v| puts v > 2 }
出力は次のようになります:
false false true
こちらをご覧ください