Skip to content

Instantly share code, notes, and snippets.

@RPGP1
Created January 26, 2014 07:32
Show Gist options
  • Save RPGP1/8629702 to your computer and use it in GitHub Desktop.
Save RPGP1/8629702 to your computer and use it in GitHub Desktop.
Array#===は要素を===で判定してくれ!
class Array
def ===(other)
return false if self.size != other.size
self.each_with_index do |value, index|
return false unless value === other[index]
end
return true
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment