This project is archived and is in readonly mode.
SyntaxError when prefixing delegation to instance variable
Reported by Daniel Schierbeck | October 19th, 2008 @ 07:51 PM | in 2.x
When using :prefix => true
in a delegation to an
instance or class variable, a SyntaxError is raised:
compile error\n(__DELEGATION__):1: syntax error, unexpected '(', expecting tCOLON2 or '.'
This patch checks the :to
value if :prefix
=> true
is set, raising an ArgumentError if it matches
^[^a-z_]
, that is, if it doesn't look like a method
name.
Comments and changes to this ticket
-
Daniel Schierbeck November 20th, 2008 @ 07:31 PM
Bump.
This is a crasher -- would anyone care to take a look at it? It's a rather trivial patch, and comes with a test 'n all.
-
Repository November 20th, 2008 @ 07:52 PM
- State changed from new to resolved
(from [2f7c073f1981ee2e901e33606c8f864fbb10dc4c]) Ensure only delegations to methods can have an automatic prefix. [#1235 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
-
Repository November 20th, 2008 @ 07:52 PM
(from [a5156d9c2c3fe63f8b6a352199e51544ae28876a]) Ensure only delegations to methods can have an automatic prefix. [#1235 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Tags
Referenced by
- 1235 SyntaxError when prefixing delegation to instance variable (from [2f7c073f1981ee2e901e33606c8f864fbb10dc4c]) Ensure ...
- 1235 SyntaxError when prefixing delegation to instance variable (from [a5156d9c2c3fe63f8b6a352199e51544ae28876a]) Ensure ...