るりまサーチ

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

別のキーワード

  1. drb current_server
  2. win32/registry hkey_current_user
  3. win32/registry hkey_current_config
  4. fiber current
  5. _builtin current

ライブラリ

クラス

モジュール

検索結果

Fiber.current -> Fiber (18120.0)

このメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。

...のメソッドが評価されたコンテキストにおける Fiber のインスタンスを返します。

//emlist[例:][ruby]{
fr = Fiber.new do
Fiber.current
end

fb = fr.resume
p fb.equal?(fr) # => true

p Fiber.current # => #<Fiber:0x91345e4>
p Fiber.current # => #<Fiber:0x91345e4>
//}...

Thread.current -> Thread (18108.0)

現在実行中のスレッド(カレントスレッド)を返します。

...現在実行中のスレッド(カレントスレッド)を返します。

p Thread.current #=> #<Thread:0x4022e6fc run>...

MiniTest::Spec.current -> MiniTest::Spec (18102.0)

現在実行中の MiniTest::Spec のインスタンスを返します。

現在実行中の MiniTest::Spec のインスタンスを返します。

IRB.CurrentContext -> IRB::Context (6101.0)

現在の irb に関する IRB::Context を返します。

現在の irb に関する IRB::Context を返します。

Data.define(*args) -> Class (13.0)

Data クラスに新しいサブクラスを作って、それを返します。

...body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end

def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end

p fetch("http://example.com/") # => "Current time i...

絞り込み条件を変える

Data.define(*args) {|subclass| block } -> Class (13.0)

Data クラスに新しいサブクラスを作って、それを返します。

...body: "Current time is #{Time.now}")
else
NotFound.new
end
end
end

def fetch(url)
fetcher = HTTPFetcher.new
case fetcher.get(url)
in HTTPFetcher::Response(body)
body
in HTTPFetcher::NotFound
:NotFound
end
end

p fetch("http://example.com/") # => "Current time i...

IRB::ExtendCommandBundle.install_extend_commands -> object (7.0)

定義済みの拡張を読み込みます。

...の拡張を読み込みます。

irb で以下のメソッドが利用できるようになります。(それぞれ 1 つだけ抜粋)

* irb_current_working_workspace
* irb_change_workspace
* irb_workspaces
* irb_push_workspace
* irb_pop_workspace
* irb_load
* irb_require
* irb_source
*...

Process.exec(command, *args) -> () (7.0)

カレントプロセスを与えられた外部コマンドで置き換えます。

...からいくつかの環境を引き継ぎます。

@param command 実行する外部コマンド。

@param args command に渡す引数。

exec "echo *" # echoes list of files in current directory
# never get here


exec "echo", "*" # echoes an asterisk
# never get here...

Thread.report_on_exception -> bool (7.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...す。
* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが...

Thread.report_on_exception=(newstate) (7.0)

真の時は、いずれかのスレッドが例外によって終了した時に、その内容を $stderr に報告します。

...す。
* Thread#join や Thread#value でそのスレッドの終了を待つことが保証できるなら、
スレッド開始時に Thread.current.report_on_exception = false でレポートを無効化しても
安全です。しかし、この場合、例外をハンドルするのが...

絞り込み条件を変える

ThreadsWait.all_waits(*threads) -> () (7.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...ドを一つもしくは複数指定します。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }

# 出力例
#=> #<Thread:0x21584 run>
#=> #<Thread:0x21610 r...

ThreadsWait.all_waits(*threads) {|thread| ...} -> () (7.0)

指定されたスレッドすべてが終了するまで待ちます。 ブロックが与えられた場合、スレッド終了時にブロックを評価します。

...ドを一つもしくは複数指定します。

require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
ThreadsWait.all_waits(*threads) {|th| printf("end %s\n", th.inspect) }

# 出力例
#=> #<Thread:0x21584 run>
#=> #<Thread:0x21610 r...

ThreadsWait.new(*threads) -> ThreadsWait (7.0)

指定されたスレッドの終了をまつための、スレッド同期オブジェクトをつくります。

...つもしくは複数指定します。

使用例
require 'thwait'

threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}

thall = ThreadsWait.new(*threads)
thall.all_waits{|th|
printf("end %s\n", th.inspect)
}

# 出力例
#=> #<Thread:0x214b...