3件ヒット
[1-3件を表示]
(0.077秒)
キーワード
- !~ (1)
- nil? (1)
-
singleton
_ class (1)
検索結果
-
Object
# nil? -> bool (42436.0) -
レシーバが nil であれば真を返します。
レシーバが nil であれば真を返します。
p false.nil? #=> false
p nil.nil? #=> true
@see NilClass -
Object
# singleton _ class -> Class (24067.0) -
レシーバの特異クラスを返します。 まだ特異クラスがなければ、新しく作成します。
...します。
@raise TypeError レシーバが Integer、Float、Symbol の場合に発生します。
//emlist[][ruby]{
Object.new.singleton_class #=> #<Class:#<Object:0xb7ce1e24>>
String.singleton_class #=> #<Class:String>
nil.singleton_class #=> NilClass
//}
@see Object#class... -
Object
# !~(other) -> bool (24049.0) -
自身が other とマッチしない事を判定します。
自身が other とマッチしない事を判定します。
self#=~(obj) を反転した結果と同じ結果を返します。
@param other 判定するオブジェクトを指定します。
//emlist[例][ruby]{
obj = 'regexp'
p (obj !~ /re/) # => false
obj = nil
p (obj !~ /re/) # => true
//}