ライブラリ
- ビルトイン (199)
- pathname (11)
- set (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6) - shellwords (33)
- socket (77)
- thread (8)
- thwait (12)
- uri (11)
クラス
- Array (57)
- BasicObject (22)
- File (11)
- Pathname (11)
- Set (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6) - Socket (44)
- String (11)
- Thread (51)
-
Thread
:: Queue (11) -
Thread
:: SizedQueue (33) - ThreadsWait (12)
モジュール
- Enumerable (22)
- Shellwords (22)
-
Socket
:: Constants (33) - URI (11)
キーワード
-
IPV6
_ JOIN _ GROUP (22) -
MCAST
_ JOIN _ GROUP (22) -
MCAST
_ JOIN _ SOURCE _ GROUP (22) - [] (11)
-
_ _ send _ _ (22) -
chunk
_ while (11) - deq (11)
- disjoint? (11)
- fetch (7)
-
join
_ nowait (6) - pack (19)
- pack テンプレート文字列 (11)
- pop (11)
-
rb
_ thread _ join (11) -
rb
_ thread _ join _ m (11) -
ruby 1
. 6 feature (11) - shelljoin (22)
- shift (22)
-
slice
_ when (11) - sum (16)
-
thread
_ variable _ get (11) - unix (11)
- unpack (11)
検索結果
先頭5件
-
File
. join(*item) -> String (30449.0) -
File::SEPARATORを間に入れて文字列を連結します。platform/DOSISH-supportで環境依存になる予定です。
...File::SEPARATORを間に入れて文字列を連結します。platform/DOSISH-supportで環境依存になる予定です。
@param item 連結したいディレクトリ名やファイル名を文字列(もしくは文字列を要素に持つ配列)で与えます。
文字列A......raise ArgumentError 引数の中に、配列要素が自身を含むような無限にネストした配列や、
ヌル文字を含む文字列が存在した場合に発生します。
//emlist[例][ruby]{
File.join("a","b") # => "a/b"
File.join("......=> "a/b"
File.join("a/","/b") # => "a/b"
File.join("a","/b") # => "a/b"
File.join("a", ["b", ["c", ["d"]]]) # => "a/b/c/d"
File.join("", "a", ["b", ["c", ["d"]]]) # => "/a/b/c/d"
File.join([]) # => ""
File.join... -
Array
# join(sep = $ , ) -> String (30431.0) -
配列の要素を文字列 sep を間に挟んで連結した文字列を返します。
...して)
join した文字列を連結します。
ただし、配列要素が自身を含むような無限にネストした配列に対しては、以下
のような結果になります。
//emlist[例][ruby]{
ary = [1,2,3]
ary.push ary
p ary # => [1, 2, 3, [...]]
p ary.join # =>......Error: recursive array join
//}
@param sep 間に挟む文字列を指定します。nil のときは空文字列を使います。
文字列以外のオブジェクトを指定した場合は to_str メソッドによ
る暗黙の型変換を試みます。
@raise TypeError......を指定した場合に発生します。
@raise ArgumentError 配列要素が自身を含むような無限にネストした配列に対
して join を呼んだ場合に発生します。
//emlist[例][ruby]{
[1, 2, 3].join('-') #=> "1-2-3"
//}
@see Array#*, $,... -
Shell
# join(*item) -> String (30407.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: CommandProcessor # join(*item) -> String (30407.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shell
:: Filter # join(*item) -> String (30407.0) -
File クラスにある同名のクラスメソッドと同じです.
...File クラスにある同名のクラスメソッドと同じです.
@param item 連結したいディレクトリ名やファイル名を文字列で与えます。
@see File.join... -
Shellwords
. join(array) -> String (30401.0) -
配列の各要素である文字列に対して、Bourne シェルのコマンドライン中で安全に 使えるためのエスケープを適用し、空白文字を介してそれらを連結したコマンド ライン文字列を生成します。
...、空白文字を介してそれらを連結したコマンド
ライン文字列を生成します。
このメソッドは、Shellwords.#shelljoin の別名です。
@param array エスケープ対象の文字列を要素とする配列を指定します。
@return エスケープ結果を連... -
Thread
# join -> self (30320.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...ドに対して発生します。
limit を指定して、limit 秒過ぎても自身が終了しない場合、nil を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによって......デッドロックが起きる場合に発生します。またカレントスレッドを join したときにも発生します。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.pus......h(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 (30320.0) -
スレッド self の実行が終了するまで、カレントスレッドを停止し ます。self が例外により終了していれば、その例外がカレントス レッドに対して発生します。
...ドに対して発生します。
limit を指定して、limit 秒過ぎても自身が終了しない場合、nil を返します。
@param limit タイムアウトする時間を整数か小数で指定します。単位は秒です。
@raise ThreadError join を実行することによって......デッドロックが起きる場合に発生します。またカレントスレッドを join したときにも発生します。
以下は、生成したすべてのスレッドの終了を待つ例です。
threads = []
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.pus......h(Thread.new { n = rand(5); sleep n; n })
threads.push(Thread.new { n = rand(5); sleep n; n })
threads.each {|t| t.join}... -
ThreadsWait
# join(*threads) -> () (30313.0) -
終了を待つスレッドの対象として、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)
p thall.threads
#=> [#<Thread:0x216ec dead>, #<Thre... -
Pathname
# join(*args) -> Pathname (30307.0) -
与えられたパス名を連結します。
...list[例][ruby]{
require "pathname"
path0 = Pathname("/usr") # Pathname:/usr
path0 = path0.join("bin/ruby") # Pathname:/usr/bin/ruby
# 上記の path0 の処理は下記の path1 と同様のパスになります
path1 = Pathname("/usr") + "bin/ruby" # Pathname:/usr/bi... -
URI
. join(uri _ str , *path) -> object (30307.0) -
文字列 uri_str と path ... を URI として連結して得られる URI オブジェクトを返します。
...文字列 uri_str と path ... を URI として連結して得られる
URI オブジェクトを返します。
2396 の Section 5.2 の
仕様に従って連結します。
以下と等価です
require 'uri'
URI.parse(uri_str) + path + ...
@param uri_str URI 文字列
@param path 後ろ......する文字列
@raise URI::InvalidComponentError 各要素が適合しない場合に発生します。
@raise URI::InvalidURIError パースに失敗した場合に発生します。
例:
require 'uri'
p URI.join('http://www.ruby-lang.org/', '/ja/man-1.6/')
=> #<URI::HTTP:0x2010017a URL:......http://www.ruby-lang.org/ja/man-1.6/>...