1915件ヒット
[1-100件を表示]
(0.031秒)
ライブラリ
- ビルトイン (458)
-
cgi
/ core (48) - csv (120)
- date (4)
- fileutils (108)
- getoptlong (24)
- json (132)
- matrix (12)
-
minitest
/ unit (2) -
net
/ imap (60) - openssl (36)
- optparse (192)
- psych (24)
- rake (36)
-
rake
/ rdoctask (24) -
rdoc
/ context (12) -
rubygems
/ command (12) -
rubygems
/ config _ file (12) -
rubygems
/ dependency _ installer (24) -
rubygems
/ dependency _ list (12) -
rubygems
/ doc _ manager (12) -
rubygems
/ ext / configure _ builder (12) -
rubygems
/ ext / ext _ conf _ builder (12) -
rubygems
/ ext / rake _ builder (12) -
rubygems
/ requirement (12) -
rubygems
/ source _ info _ cache (12) -
rubygems
/ specification (168) -
rubygems
/ user _ interaction (24) -
rubygems
/ version (24) - set (9)
-
shell
/ process-controller (18) - socket (48)
- tsort (24)
-
webrick
/ config (12)
クラス
- Array (232)
- BasicSocket (12)
- CSV (108)
- Data (3)
- Date (2)
- DateTime (2)
-
Encoding
:: Converter (36) -
Gem
:: Command (12) -
Gem
:: ConfigFile (12) -
Gem
:: DependencyInstaller (24) -
Gem
:: DependencyList (12) -
Gem
:: DocManager (12) -
Gem
:: Ext :: ConfigureBuilder (12) -
Gem
:: Ext :: ExtConfBuilder (12) -
Gem
:: Ext :: RakeBuilder (12) -
Gem
:: Requirement (12) -
Gem
:: SourceInfoCache (12) -
Gem
:: Specification (168) -
Gem
:: StreamUI (12) -
Gem
:: Version (24) - GetoptLong (24)
- Hash (12)
-
JSON
:: Parser (12) -
JSON
:: State (60) - MatchData (2)
- Matrix (12)
- Module (36)
-
Net
:: IMAP (12) -
Net
:: IMAP :: BodyTypeBasic (12) -
Net
:: IMAP :: BodyTypeMessage (12) -
Net
:: IMAP :: BodyTypeMultipart (12) -
Net
:: IMAP :: BodyTypeText (12) -
OpenSSL
:: X509 :: ExtensionFactory (36) - OptionParser (144)
-
OptionParser
:: ParseError (48) -
RDoc
:: Context (12) -
Rake
:: Application (24) -
Rake
:: RDocTask (24) -
Rake
:: Task (12) - Rational (24)
- Regexp (12)
-
RubyVM
:: InstructionSequence (12) - Set (12)
-
Shell
:: ProcessController (18) - Socket (12)
-
Socket
:: Option (12) - Struct (6)
- Time (2)
- UDPSocket (12)
モジュール
-
CGI
:: QueryExtension (24) -
CGI
:: QueryExtension :: Value (24) - Enumerable (90)
- FileUtils (108)
-
Gem
:: UserInteraction (12) - JSON (24)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
MiniTest
:: Assertions (2) - Psych (24)
- TSort (24)
-
WEBrick
:: Config (12)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) -
ARGUMENT
_ FLAGS (12) -
DEFAULT
_ RAKEFILES (12) - DigestAuth (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) - ORDERINGS (12)
- [] (12)
-
accept
_ nonblock (12) - actions (12)
-
active
_ jobs (6) -
add
_ bindir (12) -
add
_ to (12) - args (24)
-
array
_ attribute (12) -
array
_ attributes (12) -
array
_ nl (12) -
array
_ nl= (12) -
assert
_ send (1) -
attribute
_ defaults (12) -
attribute
_ names (12) - build (36)
-
capture
_ io (1) -
cert
_ chain (12) - chmod (12)
-
chmod
_ R (12) -
choose
_ from _ list (24) - chown (12)
-
chown
_ R (12) - clone (12)
- coerce (12)
-
collect
_ concat (24) - combination (24)
- concat (33)
-
configured
_ args (12) - converters (12)
- convpath (12)
-
create
_ ext _ from _ array (12) -
create
_ extension (24) -
deconstruct
_ keys (17) - dependencies (12)
-
dependent
_ gems (12) -
development
_ dependencies (12) - diagonal (12)
- dump (24)
- dup (12)
- extension (48)
- fetch (12)
-
filter
_ backtrace (12) -
find
_ spec _ by _ name _ and _ version (12) -
flat
_ map (24) - generate (12)
-
generate
_ line (12) -
header
_ converters (12) - install (12)
- intersection (18)
- jobs (6)
- list (12)
- makedirs (12)
-
mark
_ locations _ array (12) -
marshal
_ dump (24) -
marshal
_ load (12) -
mkdir
_ p (12) - mkpath (12)
-
module
_ function (36) - new (36)
- none? (42)
- one? (42)
-
option
_ list (12) - params (12)
- parse (24)
-
parse
_ line (12) - permutation (24)
-
primitive
_ errinfo (12) -
rb
_ ary _ new2 (12) -
rb
_ ary _ new3 (12) -
rb
_ check _ convert _ type (12) - read (12)
- readlines (12)
- recover (12)
-
recvfrom
_ nonblock (12) -
remove
_ by _ name (12) -
repeated
_ combination (24) -
repeated
_ permutation (24) -
required
_ attributes (12) - requirements (12)
-
response
_ handlers (12) -
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 4 feature (12) -
runtime
_ dependencies (12) -
search
_ convpath (12) -
search
_ with _ source (12) - sendmsg (12)
-
set
_ backtrace (12) -
strongly
_ connected _ components (24) - table (12)
-
to
_ a (24) -
to
_ ary (12) -
to
_ csv (12) -
to
_ h (12) -
to
_ hash (12) -
to
_ json (12) -
top
_ level _ tasks (12) -
try
_ convert (12) - tsort (12)
- union (19)
- unpack (12)
- unparse (12)
-
waiting
_ jobs (6) - 制御構造 (12)
検索結果
先頭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...