るりまサーチ

最速Rubyリファレンスマニュアル検索!
228件ヒット [1-100件を表示] (0.132秒)
トップページ > クエリ:I[x] > クエリ:on[x] > クエリ:result[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

検索結果

<< 1 2 3 > >>

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...
<< 1 2 3 > >>