1308件ヒット
[1-100件を表示]
(0.027秒)
種類
- インスタンスメソッド (956)
- 文書 (200)
- 特異メソッド (60)
- モジュール関数 (60)
- ライブラリ (32)
ライブラリ
クラス
-
ARGF
. class (96) - Array (132)
- BasicObject (48)
- CSV (24)
-
DRb
:: DRbObject (24) - Data (6)
- Hash (12)
- KeyError (8)
- Method (32)
- Module (12)
- Numeric (12)
- Object (84)
- Prime (24)
- Range (104)
- Regexp (12)
-
Rinda
:: DRbObjectTemplate (12) - Set (12)
- String (24)
- Thread (12)
-
WIN32OLE
_ TYPE (12)
モジュール
- Enumerable (278)
- GC (24)
- ObjectSpace (12)
-
Process
:: GID (24) -
Process
:: UID (24) -
Rake
:: Cloneable (12)
キーワード
- != (12)
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - === (68)
- Marshal フォーマット (12)
-
NEWS for Ruby 2
. 0 . 0 (12) -
NEWS for Ruby 2
. 1 . 0 (12) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 3 . 0 (10) -
NEWS for Ruby 2
. 4 . 0 (9) -
NEWS for Ruby 2
. 5 . 0 (8) -
NEWS for Ruby 2
. 6 . 0 (7) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) - Rubyで使われる記号の意味(正規表現の複雑な記号は除く) (12)
- Ruby用語集 (12)
- [] (8)
-
_ _ id _ _ (12) - call (16)
- clone (24)
- coverage (8)
-
default
_ event _ sources (12) - delete (24)
- detect (24)
- dup (12)
- each (72)
-
each
_ line (48) - eql? (39)
- equal? (12)
- filter (14)
- find (24)
-
find
_ all (24) - hash (12)
- instance (24)
- itself (12)
- key (8)
-
latest
_ gc _ info (24) - max (130)
-
memsize
_ of _ all (12) - min (130)
- minmax (12)
- partition (24)
-
pending
_ interrupt? (12) - rdoc (12)
- reject (48)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby 1
. 9 feature (12) - select (24)
- sort (24)
- switch (48)
-
to
_ hash (12) - yaml (12)
- クラス/メソッドの定義 (12)
検索結果
先頭5件
-
Object
# ==(other) -> bool (27148.0) -
オブジェクトと other が等しければ真を返します。
...uby]{
o = Object.new
p(o.eql?(o)) #=> true
p(o.eql?(Object.new)) #=> false
//}
下記の例のように、各クラスの性質に合わせて再定義されることが期待されています。
//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
# ===(other) -> bool (21212.0) -
case 式で使用されるメソッドです。d:spec/control#case も参照してください。
... Object#== を呼び出します。
when 節の式をレシーバーとして === を呼び出すことに注意してください。
また Enumerable#grep でも使用されます。
@param other 比較するオブジェクトです。
//emlist[][ruby]{
age = 12
# (0..2).===(12), (3..6).===(12......String class. But don't hit."
else
"unknown"
end
end
puts check([]) #=> unknown
puts check("mash-up in Ruby on Rails") #=> instance of String class. But not hit...
puts check("<Ruby's world>") #=> hit! <Ruby's world>
//}
@see Object#==, Range#===, Module#===, Regexp#===, Enumerable#grep... -
BasicObject
# ==(other) -> bool (21136.0) -
オブジェクトが other と等しければ真を、そうでない場合は偽を返します。
...デフォルトでは Object#equal? と同じオブジェクトの同一性になっています。
@param other 比較対象となるオブジェクト
@return other が self と同値であれば真、そうでない場合は偽
//emlist[例][ruby]{
class Person < BasicObject
def initialize(na......me, age)
@name = name
@age = age
end
end
tanaka1 = Person.new("tanaka", 24)
tanaka2 = Person.new("tanaka", 24)
tanaka1 == tanaka1 #=> true
tanaka1 == tanaka2 #=> false
//}
@see BasicObject#equal?, Object#==, Object#equal?,
Object#eql?... -
DRb
:: DRbObject # ==(other) -> bool (21100.0) -
DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
...DRb::DRbObject オブジェクト同士が同じであるなら真を返します。
この同値判定は、
オブジェクトが参照している URI と識別子が等しいかどうかでします。... -
Array
# ==(other) -> bool (18140.0) -
自身と other の各要素をそれぞれ順に == で比較し て、全要素が等しければ true を返します。そうでない場合には false を返します。
... == で比較し
て、全要素が等しければ true を返します。そうでない場合には false を返します。
@param other 自身と比較したい配列を指定します。
@see Object#==
//emlist[例][ruby]{
[ "a", "c" ] == [ "a", "c", 7 ] #=> false
[ "a", "c", 7 ] == [......"a", "c", 7 ] #=> true
[ "a", "c", 7 ] == [ "a", "d", "f" ] #=> false
//}... -
Data
# ==(other) -> bool (18134.0) -
self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に true を返します。そうでない場合に false を返します。
...self と other のクラスが同じであり、各メンバが == メソッドで比較して等しい場合に
true を返します。そうでない場合に false を返します。
@param other self と比較したいオブジェクトを指定します。
//emlist[例][ruby]{
Dog = Data.def......ine(:name, :age)
dog1 = Dog.new("Fred", 5)
dog2 = Dog.new("Fred", 5.0)
p 5 == 5.0 # => true
p 5.eql?(5.0) # => false
p dog1 == dog2 # => true
p dog1.eql?(dog2) # => false
p dog1.equal?(dog2) # => false
//}
[注意] 本メソッドの記述は Data のサブクラ......スのインスタンスに対して呼び
出す事を想定しています。Data.define は Data のサブクラスを作成する点に
注意してください。
@see Object#==, Data#eql?... -
String
# ==(other) -> bool (18130.0) -
other が文字列の場合、String#eql? と同様に文字列の内容を比較します。
... == self の結果を返します。(ただし、 other.to_str は実行されません。)
そうでなければ false を返します。
@param other 任意のオブジェクト
@return true か false
//emlist[例][ruby]{
stringlike = Object.new
def stringlike.==(other)
"string" ==......other
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> false
def stringlike.to_str
raise
end
p "string".eql?(stringlike) #=> false
p "string" == stringlike #=> true
//}
@see String#eql?... -
Set
# ==(set) -> bool (18118.0) -
2 つの集合が等しいときに true を返します。
...を返します。
要素の等しさは Object#eql? により判定されます。
@param set 比較対象のオブジェクトを指定します。
//emlist[][ruby]{
require 'set'
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 40]
s3 = Set[30, 10, 30, 20]
p s1 == s2 # => false
p s1 == s3 # => true
//}......には、false を返します。
要素の等しさは Object#eql? により判定されます。
@param set 比較対象のオブジェクトを指定します。
//emlist[][ruby]{
s1 = Set[10, 20, 30]
s2 = Set[10, 30, 40]
s3 = Set[30, 10, 30, 20]
p s1 == s2 # => false
p s1 == s3 # => true
//}... -
Rinda
:: DRbObjectTemplate # ===(ro) (15206.0) -
@todo
...@todo
This DRbObjectTemplate matches +ro+ if the remote object's drburi
and drbref are the same. +nil+ is used as a wildcard.... -
Method
# ===(*args) -> object (12304.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
メソッドオブジェクトに封入されているメソッドを起動します。
引数やブロックはそのままメソッドに渡されます。
self[] の形の呼び出しは通常のメソッド呼び出しに見た目を
近付けるためだけに用意されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg...