るりまサーチ

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

別のキーワード

  1. array fill
  2. array sample
  3. array []
  4. array index
  5. array rindex

検索結果

<< 1 2 > >>

Enumerable (38030.0)

繰り返しを行なうクラスのための Mix-in。このモジュールの メソッドは全て each を用いて定義されているので、インクルード するクラスには each が定義されていなければなりません。

...

Array
, Hash, Range, Enumerator等のクラスで、
Enumerable
モジュールはインクルードされています。ただし、効率化のため、
そのクラスでEnumerableと同名・同等の機能を再定義(オーバーライド)しているケースも少なくなく、
特にArray...

Array#collect -> Enumerator (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...してブロックを評価した結果を全て含む配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}

@see Hash#to_h, Enumerable#collect, Enumerable#map...

Array#collect {|item| ... } -> [object] (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...してブロックを評価した結果を全て含む配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}

@see Hash#to_h, Enumerable#collect, Enumerable#map...

Array#map -> Enumerator (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...してブロックを評価した結果を全て含む配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}

@see Hash#to_h, Enumerable#collect, Enumerable#map...

Array#map {|item| ... } -> [object] (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...してブロックを評価した結果を全て含む配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にする
p [1, 2, 3].map {|n| n * 3 } # => [3, 6, 9]
//}

@see Hash#to_h, Enumerable#collect, Enumerable#map...

絞り込み条件を変える

Enumerable#collect -> Enumerator (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}

@see Hash#to_h, Array#collect, Array#map...

Enumerable#collect {|item| ... } -> [object] (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}

@see Hash#to_h, Array#collect, Array#map...

Enumerable#map -> Enumerator (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}

@see Hash#to_h, Array#collect, Array#map...

Enumerable#map {|item| ... } -> [object] (21018.0)

各要素に対してブロックを評価した結果を全て含む配列を返します。

...配列を返します。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
# すべて 3 倍にした配列を返す
p (1..3).map {|n| n * 3 } # => [3, 6, 9]
p (1..3).collect { "cat" } # => ["cat", "cat", "cat"]
//}

@see Hash#to_h, Array#collect, Array#map...

1.6.8から1.8.0への変更点(まとめ) (636.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...別名) ((<ruby-dev:20197>))

=== Array

: ((<Array#transpose|Array/transpose>)) [new]

追加

: ((<Array#zip|Enumerable/zip>)) [new]
: ((<Enumerable#zip|Enumerable/zip>)) [new]

追加

: ((<Array#fetch|Array/fetch>)) [new]

追加

: ((<Array#insert|Array/insert>)) [new]

追加 (...
...<ENV/ENV.replace>)) [new]
: ((<ENV/ENV.update>)) [new]

((<Hash>)) との互換性のために定義されました。

=== Enumerable

: ((<Enumerable#partition|Enumerable/partition>)) [new]

追加

: ((<Enumerable#sort_by|Enumerable/sort_by>)) [new]

追加。((<ruby-dev:8986>))以降...
...提案された Schwartzian transform
を行うための sort です。

: ((<Enumerable#all?|Enumerable/all?>)) [new]
: ((<Enumerable#any?|Enumerable/any?>)) [new]
: ((<Enumerable#inject|Enumerable/inject>)) [new]
追加

=== File

: ((<File/File.extname>)) [new]

追加...

絞り込み条件を変える

ruby 1.9 feature (186.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

....file

=== 2006-09-13

: Hash#compare_by_identity
: Hash#compare_by_identity?
: Hash#identical
: Hash#identical?

=== 2006-09-12

: Hash#compare_by_identity
: Hash#compare_by_identity?

=== 2006-09-11

: Hash#identical
: Hash#identical?

=== 2006-08-31

: Array#shuffle
: Array#shuffle!

追加

==...
...ath#log2 追加 ((<ruby-talk:191237>)) [new]
: Math#log にオプショナルな第2引数 base 追加 ((<ruby-talk:191308>)) [compat]
: Array#flatten, Array#flatten! がオプショナルな level 引数を受け取るようになりました [compat]
: String#unpack("M") で CRLF を単独...
...teger#upto [compat]
: Integer#downto [compat]
: Integer#doitems [compat]

ブロックがなければ enumerator を返す

: Enumerable#group_by [new]
: Enumerable#first [new]

追加

=== 2006-01-26

: ((<BasicSocket/BasicSocket.do_not_reverse_lookup>)) [compat]

do_not_reverse_lo...

NEWS for Ruby 3.0.0 (180.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...nly.

* Array
* The following methods now return Array instances instead of subclass instances when called on subclass instances: 6087
* Array#drop
* Array#drop_while
* Array#flatten
* Array#slice!
* Array#slice / Array#[]
* Array#take
* Array#take_whi...
...ob and Dir.[] now sort the results by default, and accept the `sort:` keyword option. 8709
* ENV
* ENV.except has been added, which returns a hash excluding the given keys and their values. 15822
* Windows: Read ENV names and values as UTF-8 encoded Strings 12650
* Encoding
* Added...
...14413
* `TRUE`/`FALSE`/`NIL` constants are no longer defined.
* Integer#zero? overrides Numeric#zero? for optimization. 16961
* Enumerable#grep and Enumerable#grep_v when passed a Regexp and no block no longer modify Regexp.last_match. 17030
* Requiring 'open-uri' no longer redefines `Kern...

NEWS for Ruby 2.3.0 (168.0)

NEWS for Ruby 2.3.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...8

* Array
* Array#bsearch_index を追加
10730
* Array#dig を追加
11643

* Comparable
* Comparable#==はもはや例外を rescue しません
7688

* Encoding
* Encoding::IBM037 (alias ebcdic-cp-us; dummy) を追加

* Enumerable
* Enumerable#grep_...
...* Enumerable#chunk_while
10769

* Enumerator::Lazy
* Enumerator::Lazy#grep_v を追加
11773

* File
* File.mkfifo
11536
* O_TMPFILE に対応する File::TMPFILE(File::Constants::TMPFILE) を追加

* Hash
* Hash#fetch_values を追加
10017
* Hash#...
...dig を追加
11643
* Hash#<=, Hash#<, Hash#>=, Hash#> を追加
10984
* Hash#to_proc を追加
11653

* IO
* 新しいフラグ File::SHARE_DELETE(File::Constants::SHARE_DELETE) が使用できます。
Windows で開いているファイルを削除するこ...

ruby 1.6 feature (168.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...うです。
((<ruby-win32:273>))

: 2002-08-12 Hash#==

Hash
オブジェクトはデフォルト値 (((<Hash/default>))) も == で等しい
ときに等しいとみなされるようになりました。

p Hash.new("foo") == Hash.new("bar")

=> ruby 1.6.7 (2002-03-01) [i586...
...inux]

: 2002-03-10 メソッドの戻り値

以下のメソッドの戻り値が正しくなりました。((<ruby-bugs-ja:PR#205>))

* ((<Enumerable/each_with_index>)) が self を返すようになった(以前は nil)
* ((<Process/Process.setpgrp>)) が返す値が不定だった。
* (...
...from -:14
ruby 1.6.5 (2001-10-05) [i586-linux]

: Subclass of String and Array

String, Array のサブクラスで特定のメソッドを呼ぶと、String, Array
になっていました。

class Foo < String
end
p Foo.new("").class...
<< 1 2 > >>