This line gives me a syntax error:
if @array.include?('cat') && not @array.include?('dog')
Any ideas?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do this:
!andnotdo mostly the same thing but can’t quite be used interchangeably.For the curious: There is actually some sort of quirk in the ruby parser that makes it unable to interpret expressions like this one, even though they are theoretically parseable and sound.
These can be parsed:
but these cannot:
Note that last one is different only in the extra space before
(!