On Apr 5, 2013 11:20 PM, "rosenfeld (Rodrigo Rosenfeld Rosas)" <
rr.rosas / gmail.com> wrote:
>
>
> Issue #8191 has been updated by rosenfeld (Rodrigo Rosenfeld Rosas).
>
>
> phluid61 (Matthew Kerwin) wrote:
> > =3D=3D=3D=3D Incidentally
> >
> >  > In CoffeeScript, something that helps a lot and I'd love to see in
Ruby
> >  > is that it allows us to declare a variable in a post-if and use that
> >  > variable in the statement:
> >  >
> >  > console.log a if a =3D b.length
> >
> > This already works, as long as ((|a|)) is already defined in scope as a
variable:
> > =3Dend
>
> This is exactly the point, Matthew. I don't want to have to use "a =3D ni=
l"
before just for the sake of having a declared variable. I believe the
post-if should declare a variable that could be used by the statement if
the variable doesn't exist yet, since that code should be executed before
the statement anyway.

This is off track for this thread, but to have it do what you want you'd
have to reengineer the parser to use look-aheads.  This is not a trivial
change.  Currently by the time it sees `a=3D=B4 it's already had to make a
decision about whether the a in `p a=B4 is a variable or method.

There are other tickets about this topic (I can't link them from my phone)
but this part of the discussion would be better had over there.