330件ヒット
[201-300件を表示]
(0.092秒)
ライブラリ
- ビルトイン (162)
-
irb
/ cmd / help (12) -
irb
/ context (12) -
irb
/ extend-command (12) - monitor (60)
- optparse (36)
- pty (12)
- rake (12)
- win32ole (12)
クラス
- Fiber (18)
-
IRB
:: Context (12) -
IRB
:: ExtendCommand :: Help (12) - LocalJumpError (24)
- Monitor (36)
- OptionParser (36)
-
PTY
:: ChildExited (12) -
Process
:: Status (48) - SystemExit (24)
- Thread (48)
- WIN32OLE (12)
モジュール
- FileUtils (12)
-
IRB
:: ExtendCommandBundle (12) - MonitorMixin (24)
検索結果
先頭5件
-
Fiber
# raise -> object (113.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(exception , message = nil , backtrace = nil) -> object (113.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
Fiber
# raise(message) -> object (113.0) -
selfが表すファイバーが最後に Fiber.yield を呼んだ場所で例外を発生させます。
...{ Fiber.yield }
f.resume
f.raise "Error!" # => Error! (RuntimeError)
//}
//emlist[ファイバー内のイテレーションを終了させる例][ruby]{
f = Fiber.new do
loop do
Fiber.yield(:loop)
end
:exit
end
p f.resume # => :loop
p f.raise StopIteration # => :exit
//}... -
IRB
:: ExtendCommand :: Help # execute(*names) -> nil (107.0) -
RI から Ruby のドキュメントを参照します。
...an use tab to autocomplete.
Enter a blank line to exit.
>> String#match
String#match
(from ruby core)
------------------------------------------------------------------------------
str.match(pattern) -> matchdata or nil
str.match(pattern, pos) -> matchdata or nil
...... -
Monitor
# enter -> () (107.0) -
MonitorMixin#mon_enter の別名です。
...所有者が現在実行されているスレッドである場合、
何度でもロックできる点です。ロックした回数だけ Monitor#exit を呼ばなければモニターは
解放されません。
//emlist[例][ruby]{
require 'monitor'
mon = Monitor.new
mon.enter
mon.enter
//}
Th... -
Monitor
# mon _ enter -> () (107.0) -
モニターをロックします。
...所有者が現在実行されているスレッドである場合、
何度でもロックできる点です。ロックした回数だけ Monitor#exit を呼ばなければモニターは
解放されません。
//emlist[例][ruby]{
require 'monitor'
mon = Monitor.new
mon.enter
mon.enter
//}
Th... -
MonitorMixin
# mon _ enter -> () (107.0) -
モニターをロックします。
...の所有者が現在実行されているスレッドである場合、
何度でもロックできる点です。ロックした回数だけ mon_exit を呼ばなければモニターは
解放されません。
//emlist[例][ruby]{
require 'monitor'
buf = []
buf.extend(MonitorMixin)
buf.mon_ente... -
OptionParser
# separator(sep) -> () (107.0) -
サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。
...= "Usage: example.rb [options]"
opts.separator ""
opts.separator "Specific options:"
opts.on("-r", "--require LIBRARY") do |lib|
options.library << lib
end
opts.separator ""
opts.separator "Common options:"
opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}... -
Process
:: Status # >>(num) -> Integer (107.0) -
self.to_i >> num と同じです。
...self.to_i >> num と同じです。
@param num 整数を指定します。
fork { exit 99 } #=> 26563
Process.wait #=> 26563
$?.to_i #=> 25344
$? >> 8 #=> 99... -
Process
:: Status # to _ i -> Integer (107.0) -
C 言語での終了ステータス表現の整数を返します。
...C 言語での終了ステータス表現の整数を返します。
多くのシステムの実装では、この値の上位 8 bit に exit(2)
に渡した終了ステータスが、下位 8 bit にシグナル等で終了した等の情
報が入っています。... -
Thread
# status -> String | false | nil (107.0) -
生きているスレッドの状態を文字列 "run"、"sleep", "aborting" のいず れかで返します。正常終了したスレッドに対して false、例外によ り終了したスレッドに対して nil を返します。
...なら、このメソッドも真です。
例:
a = Thread.new { raise("die now") }
b = Thread.new { Thread.stop }
c = Thread.new { Thread.exit }
d = Thread.new { sleep }
d.kill #=> #<Thread:0x401b3678 aborting>
a.status #=> nil
b.status...