1

I often want to do something like the following to store a boolean flag in a variable:

populated? = City.inhabitants.any?

but this raises an error:

syntax error, unexpected '='

Is this due to there being some ambiguity in the language or is it simply not implemented?

sawa
  • 165,429
  • 45
  • 277
  • 381
max
  • 96,212
  • 14
  • 104
  • 165
  • It is a duplicate with respect to `?`, but not with respect to `!`. – sawa Jun 25 '15 at 04:59
  • You need to make your question clear. The title is clear, but the text is not. How is your code and the error relevant to the question that you raise in the title? – sawa Jun 25 '15 at 05:03

0 Answers0