pepe wrote: > I've run into the same problem several times before and never thought > too much of it, just made the correct change to be able to compile and > kept going. Now that I think about it I might have an answer. > > The ruby code is just what it is between <% and %>. Those 'delimiters' > are just to tell the engine something like 'ruby code coming'. The = > sign is probably actually a method call equivalent to 'puts' (I might > have read that somewhere in the AWDWR book). The rest of the line is > the parameter to the method. By putting the # sign after the = sign we > are actually commenting out the parameter to the method but leaving > the method call in place. The interpreter might not know what to do > with a method call with no parameter (maybe a parameter is mandatory > for the = sign method?) and burps. However if you put the # sign in > front of the method call (the = sign) you are commenting the whole > ruby code, hence the interpreter has no problem with it.
yeah i am suspecting it is either: <%= whatever %> changed to <% concat(whatever) %> or changed to <% output_buffer << whatever %> so if it is <%= #comment %> it becomes <% concat( #comment ) %> or <% output_buffer << #comment %> the first one fails because it comments out the ")" as well. the second one fails because it is missing something for the "<<" operator. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

