るりまサーチ

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

別のキーワード

  1. object yield_self
  2. _builtin yield_self
  3. _builtin self
  4. tracepoint self
  5. codeobject document_self

ライブラリ

クラス

キーワード

検索結果

<< 1 2 > >>

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

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

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

またブロックパラメータには 0 から self - 1 までの数値が渡されます。

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

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

Integer#times -> Enumerator (18160.0)

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

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

またブロックパラメータには 0 から self - 1 までの数値が渡されます。

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

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

Integer#downto(min) {|n| ... } -> self (146.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...
self
から min まで 1 ずつ減らしながらブロックを繰り返し実行します。
self
< min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#ste...
...p, Integer#times...

String#*(times) -> String (136.0)

文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。

...文字列の内容を times 回だけ繰り返した新しい文字列を作成して返します。

@param times 整数
@return self times 回繰り返した新しい文字列

@raise ArgumentError 引数に負数を指定したときに発生します。

//emlist[例][ruby]{
p "s...

Thread::ConditionVariable#broadcast -> self (114.0)

状態変数を待っているスレッドをすべて再開します。再開された スレッドは Thread::ConditionVariable#wait で指定した mutex のロックを試みます。

...ad::ConditionVariable#wait
で指定した mutex のロックを試みます。

@return 常に self を返します。

//emlist[例][ruby]{
mutex = Mutex.new
cv = ConditionVariable.new
flg = true

3.times {
Thread.start {
mutex.synchronize {
puts "a1"
while (flg)
cv.wait(...

絞り込み条件を変える

Thread::ConditionVariable#signal -> self (114.0)

状態変数を待っているスレッドを1つ再開します。再開された スレッドは Thread::ConditionVariable#wait で指定した mutex のロックを試みます。

...ad::ConditionVariable#wait
で指定した mutex のロックを試みます。

@return 常に self を返します。

//emlist[例][ruby]{
mutex = Mutex.new
cv = ConditionVariable.new
flg = true

3.times {
Thread.start {
mutex.synchronize {
puts "a1"
while (flg)
cv.wait(...

Integer#downto(min) -> Enumerator (46.0)

self から min まで 1 ずつ減らしながらブロックを繰り返し実行します。 self < min であれば何もしません。

...
self
から min まで 1 ずつ減らしながらブロックを繰り返し実行します。
self
< min であれば何もしません。

@param min 数値
@return self を返します。

//emlist[][ruby]{
5.downto(1) {|i| print i, " " } # => 5 4 3 2 1
//}

@see Integer#upto, Numeric#ste...
...p, Integer#times...

Integer#upto(max) -> Enumerator (45.0)

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

...
self
から max まで 1 ずつ増やしながら繰り返します。
self
> max であれば何もしません。

@param max 数値
@return self を返します。

//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}

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

Integer#upto(max) {|n| ... } -> Integer (45.0)

self から max まで 1 ずつ増やしながら繰り返します。 self > max であれば何もしません。

...
self
から max まで 1 ずつ増やしながら繰り返します。
self
> max であれば何もしません。

@param max 数値
@return self を返します。

//emlist[][ruby]{
5.upto(10) {|i| print i, " " } # => 5 6 7 8 9 10
//}

@see Integer#downto, Numeric#step, Integer#times...
<< 1 2 > >>