Sha256: 1fd694a025e5fa922525cf27ac0cf629d0ae708ff0f44a7b181cb3168a4db427

Contents?: true

Size: 311 Bytes

Versions: 8

Compression:

Stored size: 311 Bytes

Contents

#! /usr/bin/env ruby
# coding: utf-8

#
#
#
class Array
  # Whereas normal include? uses == method,
  # this method uses eql? alternatively.
  def include_eql?(other)
    result = false
    each do |i|
      if i.eql?(other)
        result ||= true
        break
      end
    end
    return result
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
builtinextension-0.1.4 lib/array/includeeql.rb
builtinextension-0.1.3 lib/array/includeeql.rb
builtinextension-0.1.2 lib/array/includeeql.rb
builtinextension-0.1.1 lib/array/includeeql.rb
builtinextension-0.1.0 lib/array/includeeql.rb
builtinextension-0.0.5 lib/array_include_eql.rb
builtinextension-0.0.4 lib/array_include_eql.rb
builtinextension-0.0.3 lib/array_include_eql.rb