[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: include? needs parentheses?
From: "Gavin Sinclair" <gsinclair () soyabean ! com ! au>
Date: 2004-04-14 8:19:59
Message-ID: 50505.129.78.228.114.1081916392.squirrel () webmail ! imagineis ! com
[Download RAW message or body]
I find this kind of odd.
$ ruby -w
puts([1,2,3].include? 1)
-:1: warning: parenthesize argument(s) for future version
true
Surely there's no ambiguity in that expression. What principle is at work
here?
Sorry if this is similar to other cases already discussed. I was paying
attention, but those cases seemed more ambiguous, hence the warning.
Gavin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic