Ad
Code
Diff
  • def verify_sum(a,b)
      a.sum == b.sum
    end
    
    class NilClass
      def sum
        return false
      end
    end
    • def verify_sum(a,b)
    • a&.sum == b&.sum
    • a.sum == b.sum
    • end
    • class NilClass
    • def sum
    • return false
    • end
    • end