summaryrefslogtreecommitdiff
path: root/spec/ruby/core/comparable/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/comparable/fixtures')
-rw-r--r--spec/ruby/core/comparable/fixtures/classes.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/ruby/core/comparable/fixtures/classes.rb b/spec/ruby/core/comparable/fixtures/classes.rb
index 4239a47d2f..2bdabbf014 100644
--- a/spec/ruby/core/comparable/fixtures/classes.rb
+++ b/spec/ruby/core/comparable/fixtures/classes.rb
@@ -7,6 +7,7 @@ module ComparableSpecs
end
def <=>(other)
+ return nil if other.nil?
self.value <=> other.value
end
end