るりまサーチ

最速Rubyリファレンスマニュアル検索!
36件ヒット [1-36件を表示] (0.027秒)
トップページ > クエリ:lock[x] > クエリ:enum_for[x]

別のキーワード

  1. _builtin enum_for
  2. _builtin to_enum
  3. lazy enum_for
  4. object enum_for
  5. lazy to_enum

ライブラリ

クラス

キーワード

検索結果

Enumerator::Lazy#enum_for(method = :each, *args) {|*args| block} -> Enumerator::Lazy (18202.0)

Object#to_enum と同じですが、Enumerator::Lazy を返します。

...要素をn回ずつ繰り返すメソッド
# 例:[1,2,3].repeat(2) #=> [1,1,2,2,3,3]
def repeat(n)
raise ArgumentError if n < 0
if block_given?
each do |*val|
n.times { yield *val }
end
else
to_enum(:repeat, n)
end
end
end

r = 1..10
p r.map{|n| n*...

Enumerator::Lazy#to_enum(method = :each, *args) {|*args| block} -> Enumerator::Lazy (3102.0)

Object#to_enum と同じですが、Enumerator::Lazy を返します。

...要素をn回ずつ繰り返すメソッド
# 例:[1,2,3].repeat(2) #=> [1,1,2,2,3,3]
def repeat(n)
raise ArgumentError if n < 0
if block_given?
each do |*val|
n.times { yield *val }
end
else
to_enum(:repeat, n)
end
end
end

r = 1..10
p r.map{|n| n*...

NEWS for Ruby 2.0.0 (30.0)

NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...: Kernel.#caller 第2引数で取得するスタックのサイズを指定できるようになりました
* 拡張: Object#to_enum Object#enum_for サイズの遅延評価のためにブロックを受け取るようになりました
* 非互換: Kernel.#system, Kernel.#exec は非標準...
...的): Mutex#owned? mutex が現在のスレッドに所持されているかどうかを返します
* 非互換:
* Mutex#lock, Mutex#unlock, Mutex#try_lock, Mutex#synchronize, Mutex#sleep
はトラップハンドラの中では使えなくなりました。そのようなとき...
...arch 二分探索

* RubyVM (MRI specific)
* 追加: RubyVM::InstructionSequence.of to get the instruction sequence
from a method or a block.
* 追加: RubyVM::InstructionSequence#path,
RubyVM::InstructionSequence#absolute_path,
RubyVM::InstructionSequence#label,
Ru...