別のキーワード
ライブラリ
クラス
- Array (57)
- BasicObject (24)
- OptionParser (24)
- Pathname (12)
- Set (12)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - String (31)
- Thread (92)
-
Thread
:: Queue (36) -
Thread
:: SizedQueue (36) - ThreadsWait (18)
-
Zlib
:: Deflate (12) -
Zlib
:: Inflate (12)
モジュール
- TSort (23)
キーワード
- * (24)
- [] (12)
-
_ _ send _ _ (24) -
abort
_ on _ exception (12) -
abort
_ on _ exception= (12) -
add
_ trace _ func (12) - deq (24)
- disjoint? (12)
-
each
_ strongly _ connected _ component _ from (23) - fetch (8)
-
join
_ nowait (6) - load (12)
-
next
_ wait (6) -
on
_ tail (12) - pack (21)
- pop (24)
-
set
_ dictionary (24) -
set
_ trace _ func (12) - shift (24)
- split (19)
- unpack (12)
検索結果
先頭5件
-
Array
# join(sep = $ , ) -> String (18138.0) -
配列の要素を文字列 sep を間に挟んで連結した文字列を返します。
...して)
join した文字列を連結します。
ただし、配列要素が自身を含むような無限にネストした配列に対しては、以下
のような結果になります。
//emlist[例][ruby]{
ary = [1,2,3]
ary.push ary
p ary # => [1, 2, 3, [...]]
p ary.join # =>......ArgumentError: recursive array join
//}
@param sep 間に挟む文字列を指定します。nil のときは空文字列を使います。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
@raise T......を指定した場合に発生します。
@raise ArgumentError 配列要素が自身を含むような無限にネストした配列に対
して join を呼んだ場合に発生します。
//emlist[例][ruby]{
[1, 2, 3].join('-') #=> "1-2-3"
//}
@see Array#*, $,... -
Thread
# join -> self (18127.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによってデッドロックが起きる場合に発生します。またカレントスレッドを join したときにも発......。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.each {|t| t.join}... -
Thread
# join(limit) -> self | nil (18127.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによってデッドロックが起きる場合に発生します。またカレントスレッドを join したときにも発......。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.each {|t| t.join}... -
Pathname
# join(*args) -> Pathname (18114.0) -
与えられたパス名を連結します。
...られたパス名を連結します。
@param args 連結したいディレクトリ名やファイル名を文字列で与えます。
//emlist[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby... -
Shell
# join(*item) -> String (18114.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: CommandProcessor # join(*item) -> String (18114.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: Filter # join(*item) -> String (18114.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
ThreadsWait
# join(*threads) -> () (18114.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。
...す。
@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join(*threads)... -
ThreadsWait
# join _ nowait(*threads) -> () (6114.0) -
終了を待つスレッドの対象として、threads で指定されたスレッドを指定します。 しかし、実際には終了をまちません。
...ん。
@param threads 複数スレッドの終了を待つスレッドに指定されたthreadsを加えます。
require 'thwait'
threads = []
5.times {|i|
threads << Thread.new { sleep 1; p Thread.current }
}
thall = ThreadsWait.new
p thall.threads #=> []
thall.join_nowait(*t... -
Set
# disjoint?(set) -> bool (6107.0) -
self と set が互いに素な集合である場合に true を返します。
...? を
使用します。
@param self Set オブジェクトを指定します。
@raise ArgumentError 引数が Set オブジェクトでない場合に発生します。
//emlist[][ruby]{
require 'set'
p Set[1, 2, 3].disjoint? Set[3, 4] # => false
p Set[1, 2, 3].disjoint? Set[4, 5] # => true
//}......tersect? を
使用します。
@param self Set オブジェクトを指定します。
@raise ArgumentError 引数が Set オブジェクトでない場合に発生します。
//emlist[][ruby]{
p Set[1, 2, 3].disjoint? Set[3, 4] # => false
p Set[1, 2, 3].disjoint? Set[4, 5] # => true
//}
@see S... -
Array
# *(sep) -> String (30.0) -
指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
...指定された sep を間にはさんで連結した文字列を生成して返します。Array#join(sep) と同じ動作をします。
@param sep 文字列を指定します。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗......黙の型変換を試みます。
//emlist[例][ruby]{
p [1,2,3] * ","
# => "1,2,3"
//}
@see Array#join...