228件ヒット
[1-100件を表示]
(0.132秒)
種類
- インスタンスメソッド (154)
- 特異メソッド (40)
- モジュール関数 (19)
- 定数 (11)
- 文書 (4)
ライブラリ
- ビルトイン (143)
- coverage (7)
- json (11)
- openssl (11)
-
rubygems
/ ext / configure _ builder (11) -
rubygems
/ ext / ext _ conf _ builder (11) -
rubygems
/ ext / rake _ builder (11) - timeout (19)
クラス
- Array (99)
- Coverage (7)
-
Encoding
:: Converter (11) -
Gem
:: Ext :: ConfigureBuilder (11) -
Gem
:: Ext :: ExtConfBuilder (11) -
Gem
:: Ext :: RakeBuilder (11) -
JSON
:: State (11) - Mutex (2)
- Object (11)
- StopIteration (11)
-
Thread
:: Mutex (9)
モジュール
-
OpenSSL
:: SSL (11) - Timeout (19)
キーワード
- === (11)
-
NEWS for Ruby 3
. 0 . 0 (4) -
VERIFY
_ NONE (11) - build (33)
- combination (22)
- fetch (11)
- generate (11)
- permutation (22)
-
primitive
_ errinfo (11) -
repeated
_ combination (22) -
repeated
_ permutation (22) - start (7)
- synchronize (11)
- timeout (19)
検索結果
先頭5件
-
StopIteration
# result -> object (24107.0) -
この例外オブジェクトを発生させる原因となったメソッド等の返り値を返します。
...ect = Object.new
def object.each
yield :yield1
yield :yield2
:each_returned
end
enumerator = object.to_enum
p enumerator.next #=> :yield1
p enumerator.next #=> :yield2
begin
enumerator.next
rescue StopIteration => error
p error.result #=> :each_returned
end... -
Gem
:: Ext :: ExtConfBuilder . build(extension , directory , dest _ path , results) -> Array (12300.0) -
@todo
...odo
Makefile が存在しない場合は、extconf.rb を実行して
Makefile を作成してから make を実行します。
@param extension ファイル名を指定します。
@param directory このメソッドでは使用していません。
@param dest_path ???
@param results コマ......ンドの実行結果を格納します。破壊的に変更されます。
@see Gem::Ext::Builder.make... -
Mutex
# synchronize { . . . } -> object (12224.0) -
mutex をロックし、ブロックを実行します。実行後に必ず mutex のロックを解放します。
...します。
@raise ThreadError self 既にカレントスレッドにロックされている場合に発
生します。
また、Signal.#trap に指定したハンドラ内で実行
した場合に発生します。
//emlist[例][ruby]{
m......= Mutex.new
result = m.synchronize do
m.locked? # => true
# critical part
"result"
end
m.locked? # => false
result # => "result"
//}... -
Thread
:: Mutex # synchronize { . . . } -> object (12224.0) -
mutex をロックし、ブロックを実行します。実行後に必ず mutex のロックを解放します。
...します。
@raise ThreadError self 既にカレントスレッドにロックされている場合に発
生します。
また、Signal.#trap に指定したハンドラ内で実行
した場合に発生します。
//emlist[例][ruby]{
m......= Mutex.new
result = m.synchronize do
m.locked? # => true
# critical part
"result"
end
m.locked? # => false
result # => "result"
//}... -
Array
# combination(n) -> Enumerator (12218.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
a.combination(1).to_a......],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=> [] : no combinations of length 5
//......た配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# combination(n) {|c| block } -> self (12218.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
a.combination(1).to_a......],[3],[4]]
a.combination(2).to_a #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
a.combination(3).to_a #=> [[1,2,3],[1,2,4],[1,3,4],[2,3,4]]
a.combination(4).to_a #=> [[1,2,3,4]]
a.combination(0).to_a #=> [[]]: one combination of length 0
a.combination(5).to_a #=> [] : no combinations of length 5
//......た配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3, 4]
result = []
a.combination(2) {|e| result << e} # => [1,2,3,4]
result #=> [[1,2],[1,3],[1,4],[2,3],[2,4],[3,4]]
//}
@see Array#permutation, Array#repeated_combination... -
Array
# permutation(n = self . length) -> Enumerator (12218.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.permutation.to_a #=>......a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation of length 0
a.permutation(4).to_a #=> [] : no permutations of leng......した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# permutation(n = self . length) { |p| block } -> self (12218.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...合は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.permutation.to_a #=>......a.permutation(1).to_a #=> [[1],[2],[3]]
a.permutation(2).to_a #=> [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
a.permutation(3).to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
a.permutation(0).to_a #=> [[]]: one permutation of length 0
a.permutation(4).to_a #=> [] : no permutations of leng......した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.permutation(2) {|e| result << e} # => [1,2,3]
result # => [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
//}
@see Array#combination, Array#repeated_permutation... -
Array
# repeated _ combination(n) -> Enumerator (12218.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_......[[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1......ed_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result << e}... -
Array
# repeated _ combination(n) { |c| . . . } -> self (12218.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2, 3]
a.repeated_combination(1).to_......[[1], [2], [3]]
a.repeated_combination(2).to_a #=> [[1,1],[1,2],[1,3],[2,2],[2,3],[3,3]]
a.repeated_combination(3).to_a #=> [[1,1,1],[1,1,2],[1,1,3],[1,2,2],[1,2,3],
# [1,3,3],[2,2,2],[2,2,3],[2,3,3],[3,3,3]]
a.repeated_combination(4).to_a #=> [[1,1,1,1],[1,1,1......ed_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result << e}... -
Array
# repeated _ permutation(n) -> Enumerator (12218.0) -
サイズ n の重複順列をすべて生成し,それを引数としてブロックを実行します。
...は to_int メソッドによる暗
黙の型変換を試みます。
@raise TypeError 引数に整数以外の(暗黙の型変換が行えない)オブジェクトを
指定した場合に発生します。
//emlist[例][ruby]{
a = [1, 2]
a.repeated_permutation(1).to_a......[[1], [2]]
a.repeated_permutation(2).to_a #=> [[1,1],[1,2],[2,1],[2,2]]
a.repeated_permutation(3).to_a #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
a.repeated_permutation(0).to_a #=> [[]] # one permutation of length 0
//}
ブロッ......ロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2]
result = []
a.repeated_permutation(3) {|e| result << e} # => [1,2]
result #=> [[1,1,1],[1,1,2],[1,2,1],[1,2,2],
# [2,1,1],[2,1,2],[2,2,1],[2,2,2]]
//}
@see Array#repeated_combination, Array#permutation...