summaryrefslogtreecommitdiffhomepage
path: root/mrblib/array.rb
diff options
context:
space:
mode:
Diffstat (limited to 'mrblib/array.rb')
-rw-r--r--mrblib/array.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/mrblib/array.rb b/mrblib/array.rb
index fedf4f33c..16e69d5d1 100644
--- a/mrblib/array.rb
+++ b/mrblib/array.rb
@@ -145,12 +145,12 @@ class Array
#
# ISO 15.2.12.5.36 (x)
def <=>(other)
+ other = self.__ary_cmp(other)
+ return 0 if 0 == other
+ return nil if nil == other
+
len = self.size
- begin
- n = other.size
- rescue NoMethodError
- return nil
- end
+ n = other.size
if len > n
len = n
end