77件ヒット
[1-77件を表示]
(0.073秒)
種類
- インスタンスメソッド (66)
- ライブラリ (11)
ライブラリ
- ビルトイン (66)
クラス
- BasicObject (11)
- Hash (11)
- Object (33)
- Struct (11)
キーワード
- == (11)
- eql? (11)
-
irb
/ completion (11)
検索結果
先頭5件
-
BasicObject
# equal?(other) -> bool (18212.0) -
オブジェクトが other と同一であれば真を、さもなくば偽を返します。
...さもなくば偽
//emlist[例][ruby]{
original = "a"
copied = original.dup
substituted = original
original == copied #=> true
original == substituted #=> true
original.equal? copied #=> false
original.equal? substituted #=> true
//}
@see Object#equal?, Object#==, Object#eql?... -
Object
# equal?(other) -> bool (18206.0) -
other が self 自身の時、真を返します。
...かを調べます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
p("foo".equal?("bar")) #=> false
p("foo".equal?("foo")) #=> false
p(4.equal?(4)) #=> true
p(4.equal?(4.0)) #=> false
p(:foo.equal? :foo) #=> true
//}
@see Object#object_id,Object#==,Object#eql?,Symbol... -
Hash
# equal?(other) -> bool (18200.0) -
指定された other が self 自身である場合のみ真を返します。
...指定された other が self 自身である場合のみ真を返します。
@param other 自身と比較したい Hash オブジェクトを指定します。
//emlist[例][ruby]{
p({}.equal?({})) #=> false
a = {}
p a.equal?(a) #=> true
//}
@see Hash#==... -
Struct
# equal?(other) -> bool (18200.0) -
指定された other が self 自身である場合のみ真を返します。 これは Object クラスで定義されたデフォルトの動作で す。
指定された other が self 自身である場合のみ真を返します。
これは Object クラスで定義されたデフォルトの動作で
す。
[注意] 本メソッドの記述は Struct の下位クラスのインスタンスに対して呼び
出す事を想定しています。Struct.new は Struct の下位クラスを作成する点に
注意してください。
@see Struct#eql?, Struct#== -
Object
# ==(other) -> bool (106.0) -
オブジェクトと other が等しければ真を返します。
...ォルトでは equal? と同じオブジェクト
の同一性判定になっています。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
p("foo" == "bar") #=> false
p("foo" == "foo") #=> true
p(4 == 4) #=> true
p(4 == 4.0) #=> true
//}
@see Object#equal?,Object#eql?... -
Object
# eql?(other) -> bool (106.0) -
オブジェクトと other が等しければ真を返します。Hash で二つのキー が等しいかどうかを判定するのに使われます。
...義されていますが、
適切にキー判定ができるようにより厳しくなっている場合もあります。
デフォルトでは equal? と同じオブジェクト
の同一性判定になっています。
このメソッドを再定義した時には Object#hash メソッ
ド......も再定義しなければなりません。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
p("foo".eql?("bar")) #=> false
p("foo".eql?("foo")) #=> true
p(4.eql?(4)) #=> true
p(4.eql?(4.0)) #=> false
//}
@see Object#hash,Object#equal?,Object#==... -
irb
/ completion (12.0) -
irb の completion 機能を提供するライブラリです。
...irb の completion 機能を提供するライブラリです。
=== 使い方
$ irb -r irb/completion
とするか, ~/.irbrc 中に
require "irb/completion"
を入れてください.
irb実行中に require "irb/completion" してもよいです.
irb 実行中に [Tab] を押すとコ......foo.to_a
foo.dup foo.kind_of? foo.to_s
foo.eql? foo.method foo.type
foo.equal? foo.methods foo.untaint
foo.extend foo.nil?
foo.freeze foo.private_methods...