lib/array_include_eql.rb in builtinextension-0.0.2 vs lib/array_include_eql.rb in builtinextension-0.0.3

- old
+ new

@@ -3,20 +3,20 @@ # # # class Array - # 通常の include? は == で判定するが、 - # これではなく eql? を使って判定するようにしたもの。 - def include_eql?(other) - result = false - each do |i| - if i.eql?(other) - result ||= true - break - end - end - return result - end + # 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