self == other -> boolRuby 1.9.3 から[permalink][rdoc][edit]-
乱数生成器が等しい状態であるならばtrue を返します。
- [PARAM]
other: - 比較対象の乱数生成器
r1 = Random.new(1) r2 = Random.new(1) p r1 == r2 # => true r2.rand p r1 == r2 # => false r1.rand p r1 == r2 # => true - [PARAM]
self == other -> boolRuby 1.9.3 から[permalink][rdoc][edit]乱数生成器が等しい状態であるならばtrue を返します。
other:r1 = Random.new(1)
r2 = Random.new(1)
p r1 == r2 # => true
r2.rand
p r1 == r2 # => false
r1.rand
p r1 == r2 # => true