On Mon, Jun 24, 2013 at 2:02 AM, Arslan Farooq <lists / ruby-forum.com> wrote:

> 1: There should be no space between File::open and (

Well done!  That one can be a bit tricky to figure out on your own.

Just to expand on this a bit more: this may seem like a picky
stylistic issue, but apparently it's a parser problem.  (Not quite
sure I'd call it an outright "bug", since it does seem to be in line
with the Ruby specs.)  The space makes the parser think that the next
thing isn't a parameter *list*, but a *single* parameter, as a
paranthesized expression.  (Possibly to be followed by a comma and
more parameters.)  So it tries to parse it as that, and when it runs
into the comma, it doesn't know what to do, because a comma-separated
set of expressions is not a valid expression itself in Ruby.  See:

  https://docs.google.com/presentation/d/1cqdp89_kolr4q1YAQaB-6i5GXip8MHyve8MvQ_1r6_s/#slide=id.gd9ccd329_00

for a simpler example.  Check out the rest of the slides while you're
there; they're from my Ruby Gotchas presentation.  :-)

-Dave

-- 
Dave Aronson, the T. Rex of Codosaurus LLC,
secret-cleared freelance software developer
taking contracts in or near NoVa or remote.
See information at http://www.Codosaur.us/.