This project is archived and is in readonly mode.

#1235 ✓resolved
Daniel Schierbeck

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

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

Referenced by

Pages