るりまサーチ

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

別のキーワード

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

ライブラリ

クラス

モジュール

検索結果

<< < ... 12 13 14 >>

NEWS for Ruby 2.1.0 (30.0)

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

...

* Array
* 追加: Array#to_h キーと値のペアの配列をハッシュに変換します。

* Binding
* 追加: Binding#local_variable_get
* 追加: Binding#local_variable_set
* 追加: Binding#local_variable_defined?

* Enumerable
* 追加: Enumerable#to_h キー...
...ときは string-scrub gem を使います。

* Symbol
* 全てのシンボルは freeze されるようになりました

* pack/unpack (Array/String)
* プラットフォームが対応していれば Q! と q! は long long 型を表します

* toplevel
* main.using はもは...

set (18.0)

集合を表す Set クラスと、取り出し順序を保証した SortedSet クラスを提供 します。

...、取り出し順序を保証した SortedSet クラスを提供
します。

集合とは重複のないオブジェクトの集まりです。
Array
の持つ演算機能と Hash の高速な検索機能を合わせ持ちます。

Set および SortedSet は内部記憶として Hash を使う...
...、集合要素はソートされた順序で取り出されます。

また、set ライブラリを require すると Enumerable モジュールが
拡張され、Enumerable#to_set の形で集合オブジェクトを生成できる
ようになります。

=== 注意事項

集合オブジェ...
...集合を表す Set クラスを提供します。

集合とは重複のないオブジェクトの集まりです。
Array
の持つ演算機能と Hash の高速な検索機能を合わせ持ちます。

Set は内部記憶として Hash を使うため、集合要素の等価性は
Object#eql?...
...、集合要素を取り出す際の順序は保証されません。

また、set ライブラリを require すると Enumerable モジュールが
拡張され、Enumerable#to_set の形で集合オブジェクトを生成できる
ようになります。

=== 注意事項

集合オブジェ...

Object#enum_for(method = :each, *args) -> Enumerator (12.0)

Enumerator.new(self, method, *args) を返します。

...= enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n...

Object#enum_for(method = :each, *args) {|*args| ... } -> Enumerator (12.0)

Enumerator.new(self, method, *args) を返します。

...= enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n...

Object#to_enum(method = :each, *args) -> Enumerator (12.0)

Enumerator.new(self, method, *args) を返します。

...= enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n...

絞り込み条件を変える

Object#to_enum(method = :each, *args) {|*args| ... } -> Enumerator (12.0)

Enumerator.new(self, method, *args) を返します。

...= enum.map{|b| '%02x' % b }) #=> ["78", "79", "7a"]

# protects an array from being modified
a = [1, 2, 3]
p(a.to_enum) #=> #<Enumerator: [1, 2, 3]:each>
//}

//emlist[例(ブロックを指定する場合)][ruby]{
module Enumerable
def repeat(n)
raise ArgumentError, "#{n} is negative!" if n...
<< < ... 12 13 14 >>