self <=> other -> 0 | nilRuby 1.9.3 から[permalink][rdoc][edit]-
self === other である場合に 0 を返します。そうでない場合には nil を返します。
例a = Object.new b = Object.new p a <=> a # => 0 p a <=> b # => nil[SEE_ALSO] Object#===
self <=> other -> 0 | nilRuby 1.9.3 から[permalink][rdoc][edit]self === other である場合に 0 を返します。そうでない場合には nil を返します。
例a = Object.new
b = Object.new
p a <=> a # => 0
p a <=> b # => nil
[SEE_ALSO] Object#===