Sha256: edad296440adea444a739b1e3c9c0965200d7eef7d04f378739df0f99fc45606

Contents?: true

Size: 221 Bytes

Versions: 10

Compression:

Stored size: 221 Bytes

Contents

class VariableArray < Array
  def ==(other)
    if other.is_a?(Array)
      comp = self[1..(self.length - 1)]
      return true if comp.first == other.first
    else
      super
    end
  end
  alias_method :eql?, :==
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
hash_dealer-1.4.2 lib/variable_array.rb
hash_dealer-1.4.1 lib/variable_array.rb
hash_dealer-1.4.0 lib/variable_array.rb
hash_dealer-1.3.6 lib/variable_array.rb
hash_dealer-1.3.5 lib/variable_array.rb
hash_dealer-1.3.4 lib/variable_array.rb
hash_dealer-1.3.3 lib/variable_array.rb
hash_dealer-1.3.2 lib/variable_array.rb
hash_dealer-1.3.1 lib/variable_array.rb
hash_dealer-1.3.0 lib/variable_array.rb