1738件ヒット
[1-100件を表示]
(0.047秒)
別のキーワード
ライブラリ
- ビルトイン (382)
-
cgi
/ core (44) - csv (110)
- fileutils (99)
- getoptlong (22)
- json (121)
- matrix (11)
-
minitest
/ unit (2) -
net
/ imap (55) - openssl (33)
- optparse (176)
- psych (22)
- rake (33)
-
rake
/ rdoctask (22) -
rdoc
/ context (11) -
rubygems
/ command (11) -
rubygems
/ config _ file (11) -
rubygems
/ dependency _ installer (22) -
rubygems
/ dependency _ list (11) -
rubygems
/ doc _ manager (11) -
rubygems
/ ext / configure _ builder (11) -
rubygems
/ ext / ext _ conf _ builder (11) -
rubygems
/ ext / rake _ builder (11) -
rubygems
/ gem _ path _ searcher (22) -
rubygems
/ requirement (11) -
rubygems
/ source _ info _ cache (11) -
rubygems
/ specification (154) -
rubygems
/ user _ interaction (22) -
rubygems
/ version (22) - set (11)
-
shell
/ process-controller (18) - socket (44)
- tsort (22)
-
webrick
/ config (11)
クラス
- Array (209)
- BasicSocket (11)
- CSV (99)
- Data (4)
-
Encoding
:: Converter (33) -
Gem
:: Command (11) -
Gem
:: ConfigFile (11) -
Gem
:: DependencyInstaller (22) -
Gem
:: DependencyList (11) -
Gem
:: DocManager (11) -
Gem
:: Ext :: ConfigureBuilder (11) -
Gem
:: Ext :: ExtConfBuilder (11) -
Gem
:: Ext :: RakeBuilder (11) -
Gem
:: GemPathSearcher (22) -
Gem
:: Requirement (11) -
Gem
:: SourceInfoCache (11) -
Gem
:: Specification (154) -
Gem
:: StreamUI (11) -
Gem
:: Version (22) - GetoptLong (22)
- Hash (11)
-
JSON
:: Parser (11) -
JSON
:: State (55) - Matrix (11)
- Module (12)
-
Net
:: IMAP (11) -
Net
:: IMAP :: BodyTypeBasic (11) -
Net
:: IMAP :: BodyTypeMessage (11) -
Net
:: IMAP :: BodyTypeMultipart (11) -
Net
:: IMAP :: BodyTypeText (11) -
OpenSSL
:: X509 :: ExtensionFactory (33) - OptionParser (132)
-
OptionParser
:: ParseError (44) -
RDoc
:: Context (11) -
Rake
:: Application (22) -
Rake
:: RDocTask (22) -
Rake
:: Task (11) - Rational (22)
- Regexp (11)
-
RubyVM
:: InstructionSequence (11) - Set (11)
-
Shell
:: ProcessController (18) - Socket (11)
-
Socket
:: Option (11) - UDPSocket (11)
モジュール
-
CGI
:: QueryExtension (22) -
CGI
:: QueryExtension :: Value (22) - Enumerable (80)
- FileUtils (99)
-
Gem
:: UserInteraction (11) - JSON (22)
-
JSON
:: Generator :: GeneratorMethods :: Array (11) -
MiniTest
:: Assertions (2) - Psych (22)
- TSort (22)
-
WEBrick
:: Config (11)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (11) -
ARGUMENT
_ FLAGS (11) -
DEFAULT
_ RAKEFILES (11) - DigestAuth (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - ORDERINGS (11)
- [] (11)
-
accept
_ nonblock (11) - actions (11)
-
active
_ jobs (6) -
add
_ bindir (11) -
add
_ to (11) - args (22)
-
array
_ attribute (11) -
array
_ attributes (11) -
array
_ nl (11) -
array
_ nl= (11) -
assert
_ send (1) -
attribute
_ defaults (11) -
attribute
_ names (11) - build (33)
-
capture
_ io (1) -
cert
_ chain (11) - chmod (11)
-
chmod
_ R (11) -
choose
_ from _ list (22) - chown (11)
-
chown
_ R (11) - clone (11)
- coerce (11)
-
collect
_ concat (22) - combination (22)
- concat (30)
-
configured
_ args (11) - converters (11)
- convpath (11)
-
create
_ ext _ from _ array (11) -
create
_ extension (22) - deconstruct (2)
-
deconstruct
_ keys (2) - dependencies (11)
-
dependent
_ gems (11) -
development
_ dependencies (11) - diagonal (11)
- dump (22)
- dup (11)
- extension (44)
- fetch (11)
-
filter
_ backtrace (11) - find (11)
-
find
_ all (11) -
find
_ spec _ by _ name _ and _ version (11) -
flat
_ map (22) - generate (11)
-
generate
_ line (11) -
header
_ converters (11) - install (11)
- intersection (16)
- jobs (6)
- list (11)
- makedirs (11)
-
mark
_ locations _ array (11) -
marshal
_ dump (22) -
marshal
_ load (11) -
mkdir
_ p (11) - mkpath (11)
-
module
_ function (12) - new (33)
- none? (36)
- one? (36)
-
option
_ list (11) - params (11)
- parse (22)
-
parse
_ line (11) - permutation (22)
-
primitive
_ errinfo (11) -
rb
_ ary _ new2 (11) -
rb
_ ary _ new3 (11) -
rb
_ check _ convert _ type (11) - read (11)
- readlines (11)
- recover (11)
-
recvfrom
_ nonblock (11) -
remove
_ by _ name (11) -
repeated
_ combination (22) -
repeated
_ permutation (22) -
required
_ attributes (11) - requirements (11)
-
response
_ handlers (11) -
ruby 1
. 6 feature (11) -
ruby 1
. 8 . 2 feature (11) -
ruby 1
. 8 . 4 feature (11) -
runtime
_ dependencies (11) -
search
_ convpath (11) -
search
_ with _ source (11) - sendmsg (11)
-
set
_ backtrace (11) -
strongly
_ connected _ components (22) - table (11)
-
to
_ a (22) -
to
_ ary (11) -
to
_ csv (11) -
to
_ h (11) -
to
_ hash (11) -
to
_ json (11) -
top
_ level _ tasks (11) -
try
_ convert (11) - tsort (11)
- union (17)
- unpack (11)
- unparse (11)
-
waiting
_ jobs (6) - 制御構造 (11)
検索結果
先頭5件
-
Array
# intersection(*other _ arrays) -> Array (27307.0) -
自身と引数に渡された配列の共通要素を新しい配列として返します。 要素が重複する場合は、そのうちの1つのみを返します。 要素の順序は自身の順序を維持します。
...要素が重複する場合は、そのうちの1つのみを返します。
要素の順序は自身の順序を維持します。
@param other_arrays 自身と共通要素を取りたい配列を指定します。
配列以外のオブジェクトを指定した場合は to_a......発生します。
intersectionはObject#hashとObject#eql?を使って比較を行います。
//emlist[例][ruby]{
[1, 1, 3, 5].intersection([3, 2, 1]) # => [1, 3]
["a", "b", "z"].intersection(["a", "b", "c"], ["b"]) # => ["b"]
["a"].intersection......# => ["a"]
//}
@see Set#intersection, Array#&... -
Array
# union(*other _ arrays) -> Array (27307.0) -
集合の和演算です。self と other_arrays の配列にどれかに含まれる要素を 全て含む新しい配列を返します。重複する要素は取り除かれます。
...算です。self と other_arrays の配列にどれかに含まれる要素を
全て含む新しい配列を返します。重複する要素は取り除かれます。
要素の重複判定は、Object#eql? と Object#hash により行われます。
@param other_arrays 0個以上の配列を......指定します。
//emlist[例][ruby]{
["a", "b", "c"].union([ "c", "d", "a" ]) #=> ["a", "b", "c", "d"]
["a"].union(["e", "b"], ["a", "c", "b"]) #=> ["a", "e", "b", "c"]
["a"].union # => ["a"]
//}
@see Array#|... -
Array
. try _ convert(obj) -> Array | nil (27225.0) -
to_ary メソッドを用いて obj を配列に変換しようとします。
...引数が配列であるかどうかを調べるために使えます。
//emlist[例][ruby]{
Array.try_convert([1]) # => [1]
Array.try_convert("1") # => nil
if tmp = Array.try_convert(arg)
# the argument is an array
elsif tmp = String.try_convert(arg)
# the argument is a string
end
//}... -
Array
# concat(*other _ arrays) -> self (27209.0) -
other_arrays の要素を自身の末尾に破壊的に連結します。
..._arrays の要素を自身の末尾に破壊的に連結します。
@param other_arrays 自身と連結したい配列を指定します。
//emlist[例][ruby]{
[ "a", "b" ].concat( ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].concat( ["b"], ["c", "d"] ) #=> [ "a", "b", "c", "d" ]
[ "a" ].conc......at #=> [ "a" ]
a = [ 1, 2, 3 ]
a.concat( [ 4, 5 ] )
a #=> [ 1, 2, 3, 4, 5 ]
a = [ 1, 2 ]
a.concat(a, a) #=> [1, 2, 1, 2, 1, 2]
//}
@see Array#+... -
Array
# clone -> Array (27202.0) -
レシーバと同じ内容を持つ新しい配列を返します。
...レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容と tainted だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり......レシーバと同じ内容を持つ新しい配列を返します。
clone は frozen singleton-class の情報も含めてコピーしますが、
dup は内容だけをコピーします。
またどちらのメソッドも要素それ自体のコピーはしません。
つまり参照して... -
Array
# concat(other) -> self (27119.0) -
配列 other を自身の末尾に破壊的に連結します。
...other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}......列 other を自身の末尾に破壊的に連結します。
@param other 自身と連結したい配列を指定します。
//emlist[例][ruby]{
array = [1, 2]
a = [3, 4]
array.concat a
p array # => [1, 2, 3, 4]
p a # => [3, 4] # こちらは変わらない
//}... -
Array
# combination(n) -> Enumerator (27112.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[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 (27112.0) -
サイズ n の組み合わせをすべて生成し、それを引数としてブロックを実行します。
...4]
a.combination(1).to_a #=> [[1],[2],[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 (27112.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...tion.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
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......f length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して 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 (27112.0) -
サイズ n の順列をすべて生成し,それを引数としてブロックを実行します。
...tion.to_a #=> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]
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......f length 0
a.permutation(4).to_a #=> [] : no permutations of length 4
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して 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 (27112.0) -
サイズ n の重複組み合わせをすべて生成し、それを引数としてブロックを実行 します。
...ombination(1).to_a #=> [[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......epeated_combination(0).to_a #=> [[]] # one combination of length 0
//}
ブロックが与えられた場合、作成した配列の各要素を引数としてブロックを実
行して self を返します。
//emlist[例][ruby]{
a = [1, 2, 3]
result = []
a.repeated_combination(3) {|e| result <......< e} # => [1,2,3]
result #=> [[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]]
//}
@see Array#repeated_permutation, Array#combination...