ライブラリ
- ビルトイン (195)
- continuation (44)
- fiddle (55)
-
minitest
/ unit (16) - monitor (11)
- open-uri (4)
- openssl (22)
- tsort (53)
-
webrick
/ httpproxy (11) -
webrick
/ httpserver (11)
クラス
- Continuation (22)
- Exception (7)
-
Fiddle
:: Closure (11) -
Fiddle
:: Closure :: BlockCaller (11) -
Fiddle
:: Function (33) - LocalJumpError (11)
- Method (11)
- Module (5)
- Object (11)
-
OpenSSL
:: SSL :: SSLContext (22) - Proc (5)
- Thread (24)
-
Thread
:: Backtrace :: Location (44) -
WEBrick
:: HTTPProxyServer (11) -
WEBrick
:: HTTPServer (11)
モジュール
- Enumerable (44)
- Kernel (48)
-
MiniTest
:: Assertions (16) - TSort (53)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) - Continuation (11)
- MonitorMixin (11)
-
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) - Rubyの起動 (3)
- STDCALL (11)
- [] (11)
-
absolute
_ path (11) - assert (1)
-
assert
_ block (1) -
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ match (1) -
assert
_ nil (1) -
assert
_ operator (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assert
_ throws (1) -
base
_ label (11) - callcc (11)
-
caller
_ locations (22) - clone (11)
- detect (22)
-
each
_ strongly _ connected _ component (21) -
each
_ strongly _ connected _ component _ from (21) - find (22)
- inspect (11)
- new (55)
- open (4)
- rdoc (11)
- reason (11)
-
report
_ on _ exception (16) -
report
_ on _ exception= (8) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 4 feature (11) -
ruby2
_ keywords (10) -
singleton
_ method (11) -
strongly
_ connected _ components (11) - syscall (11)
-
tmp
_ dh _ callback (11) -
to
_ s (11) - tsort (11)
-
verify
_ callback (11) - 制御構造 (11)
- 正規表現 (11)
検索結果
先頭5件
- Continuation
# call(*ret) -> () - Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil - TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator - TSort
. each _ strongly _ connected _ component(each _ node , each _ child) {|nodes| . . . } -> nil - TSort
. strongly _ connected _ components(each _ node , each _ child) -> Array
-
Continuation
# call(*ret) -> () (21201.0) -
self が記憶した状態を継続します。引数は そのまま Kernel.#callcc の戻り値になります。
...self が記憶した状態を継続します。引数は そのまま
Kernel.#callcc の戻り値になります。
@param ret 継続に復帰した時に返す値を指定します。... -
Fiddle
:: Function # call(*args) -> Integer|DL :: CPtr|nil (21201.0) -
関数を呼び出します。
...関数を呼び出します。
Fiddle::Function.new で指定した引数と返り値の型に基いて
Ruby のオブジェクトを適切に C のデータに変換して C の関数を呼び出し、
その返り値を Ruby のオブジェクトに変換して返します。
引数の変換は....../int/long/long long
Ruby の整数を C の整数に変換します。
: double/float
Ruby の整数 or 浮動小数点数を C の浮動小数点数に変換します
返り値の変換は以下の通りです。
: void
nil を返します
: (unsigned) char/short/int/long/long long
C......の整数を Ruby の整数に変換します
: void*(つまり任意のポインタ型)
C のポインタを保持した Fiddle::Pointer を返します。
@param args 関数の引数
@see Fiddle::Function.new... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) -> Enumerator (18412.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param......るcallメソッ
ドを持つオブジェクトを指定します。
//emlist[使用例][ruby]{
require 'tsort'
g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component......[3]
# [1]
g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
# => [4]
# [2, 3]
# [1]
//}
@see TSort#each_strongly_connected_component... -
TSort
. each _ strongly _ connected _ component(each _ node , each _ child) {|nodes| . . . } -> nil (18412.0) -
TSort.strongly_connected_components メソッドのイテレータ版です。
...TSort.strongly_connected_components メソッドのイテレータ版です。
引数 each_node と each_child でグラフを表します。
@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param......るcallメソッ
ドを持つオブジェクトを指定します。
//emlist[使用例][ruby]{
require 'tsort'
g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component......[3]
# [1]
g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
TSort.each_strongly_connected_component(each_node, each_child) {|scc| p scc }
# => [4]
# [2, 3]
# [1]
//}
@see TSort#each_strongly_connected_component... -
TSort
. strongly _ connected _ components(each _ node , each _ child) -> Array (18412.0) -
強連結成分の集まりを配列の配列として返します。 この配列は子から親に向かってソートされています。 各要素は強連結成分を表す配列です。
...@param each_node グラフ上の頂点をそれぞれ評価するcallメソッドを持つオブ
ジェクトを指定します。
@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ
ドを持つオブジェクトを指......&b| g[n].each(&b) }
p TSort.strongly_connected_components(each_node, each_child)
# => [[4], [2], [3], [1]]
g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_node = lambda {|&b| g.each_key(&b) }
each_child = lambda {|n, &b| g[n].each(&b) }
p TSort.strongly_connected_components(each_node, each_child)
# =>......[[4], [2, 3], [1]]
//}
@see TSort#strongly_connected_components... -
TSort
. each _ strongly _ connected _ component _ from(node , each _ child , id _ map={} , stack=[]) -> Enumerator (18406.0) -
node から到達可能な強連結成分についてのイテレータです。
...ん。
TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。
@param node ノードを指定します。
@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ......//emlist[使用例][ruby]{
require 'tsort'
graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
p scc
}
# => [4]
# [2, 3]
# [1]
//}
@see TSort#each_strongly_connected_component_from... -
TSort
. each _ strongly _ connected _ component _ from(node , each _ child , id _ map={} , stack=[]) {|nodes| . . . } -> () (18406.0) -
node から到達可能な強連結成分についてのイテレータです。
...ん。
TSort.each_strongly_connected_component_fromはTSortをincludeして
グラフを表現する必要のないクラスメソッドです。
@param node ノードを指定します。
@param each_child 引数で与えられた頂点の子をそれぞれ評価するcallメソッ......//emlist[使用例][ruby]{
require 'tsort'
graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
p scc
}
# => [4]
# [2, 3]
# [1]
//}
@see TSort#each_strongly_connected_component_from... -
Kernel
. # caller _ locations(range) -> [Thread :: Backtrace :: Location] | nil (12400.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Us......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Kernel
. # caller _ locations(start = 1 , length = nil) -> [Thread :: Backtrace :: Location] | nil (12400.0) -
現在のフレームを Thread::Backtrace::Location の配列で返します。引 数で指定した値が範囲外の場合は nil を返します。
...現在のフレームを Thread::Backtrace::Location の配列で返します。引
数で指定した値が範囲外の場合は nil を返します。
@param start 開始フレームの位置を数値で指定します。
@param length 取得するフレームの個数を指定します。
@pa......def test1(start, length)
locations = caller_locations(start, length)
p locations
p locations.map(&:lineno)
p locations.map(&:path)
end
def test2(start, length)
test1(start, length)
end
def test3(start, length)
test2(start, length)
end
caller_locations # => []
test3(1, nil)
# => ["/Us......(1, 2)
# => ["/Users/user/test.rb:9:in `test2'", "/Users/user/test.rb:13:in `test3'"]
# => [9, 13]
# => ["/Users/user/test.rb", "/Users/user/test.rb"]
test3(2, 1)
# => ["/Users/user/test.rb:13:in `test3'"]
# => [13]
# => ["/Users/user/test.rb"]
//}
@see Thread::Backtrace::Location, Kernel.#caller... -
Thread
# report _ on _ exception -> bool (12344.0) -
真の場合、そのスレッドが例外によって終了した時に、その内容を $stderr に報告します。
...ad.report_on_exception です。
@param newstate スレッド実行中に例外発生した場合、その内容を報告するかどうかを true か false で指定します。
//emlist[例][ruby]{
a = Thread.new{ Thread.stop; raise }
a.report_on_exception = true
a.report_on_exception # => tr......:1 run> terminated with exception (report_on_exception is true):
# Traceback (most recent call last):
# (irb):1:in `block in irb_binding': unhandled exception
# #<Thread:0x00007fc3f48c7908@(irb):1 dead>
b = Thread.new{ Thread.stop; raise }
b.report_on_exception = false
b.run # => #<Thread......:0x00007fc3f48aefc0@(irb):4 dead>
//}
@see Thread.report_on_exception...