るりまサーチ

最速Rubyリファレンスマニュアル検索!
1415件ヒット [1401-1415件を表示] (0.028秒)

別のキーワード

  1. numeric step
  2. _builtin numeric
  3. numeric -@
  4. numeric %
  5. numeric i

ライブラリ

クラス

キーワード

検索結果

<< < ... 13 14 15 >>

Integer#times -> Enumerator (13.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@
see Integer#upto, Integer#downto, Numeric#step...

Integer#times {|n| ... } -> self (13.0)

self 回だけ繰り返します。 self が正の整数でない場合は何もしません。

...れます。

//emlist[][ruby]{
3.times { puts "Hello, World!" } # Hello, World! と3行続いて表示される。
0.times { puts "Hello, World!" } # 何も表示されない。
5.times {|n| print n } # 01234 と表示される。
//}

@
see Integer#upto, Integer#downto, Numeric#step...
<< < ... 13 14 15 >>