Class: Tuple

Inherits:
Array
  • Object
show all
Defined in:
lib/revactor.rb

Overview

A Tuple class. Will (eventually) be a subset of Array with fixed size and faster performance, at least that’s the hope with Rubinius…

Instance Method Summary collapse

Instance Method Details

#===(obj) ⇒ Object



18
19
20
21
22
# File 'lib/revactor.rb', line 18

def ===(obj)
  return false unless obj.is_a? Array
  size.times { |n| return false unless self[n] === obj[n] }
  true
end