Hi,
2009/3/6 Jeremy Evans <[email protected]>:
> I don't like this implementation. Allowing the boolean AND and OR
> operators to take no arguments makes no sense.
Hmm, I feel that it is natural for AND operator to return true if
it takes no arguments:
[].all? { false } #=> true
But I understood your philosophy about empty hash.
> I should point out that you can rewrite the original code to:
>
> table = table.clone
> table.filter!(:column1=>:foo) if column1_must_be_foo
> table.filter!(:column2=>:bar) if column2_must_be_bar
>
> That's how I generally deal with such situations now.
Aha, I did not know that filter can be used more than once.
I'll try to reconsider my source code.
Thanks,
--
Yusuke ENDOH <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---