36件ヒット
[1-36件を表示]
(0.173秒)
別のキーワード
種類
- インスタンスメソッド (24)
- 文書 (12)
ライブラリ
- ビルトイン (24)
クラス
- BasicObject (24)
キーワード
- != (12)
-
ruby 1
. 9 feature (12)
検索結果
-
BasicObject
# ! -> bool (42179.0) -
オブジェクトを真偽値として評価し、その論理否定を返します。
...も Ruby の制御式において nil や false 以外が偽として
扱われることはありません。
@return オブジェクトが偽であれば真、さもなくば偽
//emlist[例][ruby]{
class NegationRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count......ef !
@count += 1
super
end
end
recorder = NegationRecorder.new
!recorder
!!!!!!!recorder
puts 'hoge' if !recorder
puts recorder.count #=> 3
//}
//emlist[例][ruby]{
class AnotherFalse < BasicObject
def !
true
end
end
another_false = AnotherFalse.new
# another_falseは*真*
puts......"another false is a truth" if another_false
#=> "another false is a truth"
//}... -
BasicObject
# !=(other) -> bool (30254.0) -
オブジェクトが other と等しくないことを判定します。
...オブジェクトが other と等しくないことを判定します。
デフォルトでは self == other を評価した後に結果を論理否定して返します。
このため、サブクラスで BasicObject#== を再定義しても != とは自動的に整合性が
とれるように......ther 比較対象となるオブジェクト
@see BasicObject#==, BasicObject#!
//emlist[例][ruby]{
class NonequalityRecorder < BasicObject
def initialize
@count = 0
end
attr_reader :count
def !=(other)
@count += 1
super
end
end
recorder = NonequalityRecorder.new
recorder !......= 1
puts 'hoge' if recorder != "str"
p recorder.count #=> 2
//}... -
ruby 1
. 9 feature (10760.0) -
ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。
...ruby 1.9 feature
ruby version 1.9.0 は開発版です。
以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。
1.9.1 以降は安定版です。
バグ修正がメインになります。
記号について(特に重要なもの......は大文字(主観))
* カテゴリ
* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* [parser]: 文法の変更
* [regexp]: 正規表現の機能拡張
* [marshal]: Marshal ファイルのフォーマット変更
* レベル
* [b......igest::Base.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!...