elcuervo / minuteman

Fast analytics using Redis
elcuervo.github.com/minuteman
MIT License
629 stars 63 forks source link

Update README.md #2

Closed banafederico closed 12 years ago

banafederico commented 12 years ago
successfull_logins & failed_logins

That would give you logins that are both in the success and failed array. The + operator is the one I think would fit in there.

Here's my experiment:

array1 = [1, 2, 3]
array2 = [3, 4, 5, 6]

print "Intersections: \n"
print array1 & array2
print "\n"

print "Addition: \n"
print array1 + array2
print "\n"

Prints:

Intersections: 3 Addition: 1233456

elcuervo commented 12 years ago

Actually the bitwise operators are redefined in both sets and results:

https://github.com/elcuervo/minuteman/blob/master/lib/minuteman/bit_operations.rb#L52-54

elcuervo commented 12 years ago

But yes, the documentation is wrong. I'll fix it