Not sure if this is the right place for this, but it's certainly to do with
core Rails and only of interest to pretty hard-core framework hackers...
Anyways, the issue I ran into was that aliasing a method (<<) to a setter
(append=) doesn't quite work the way you'd expect. For instance:
x = ActionView::OutputBuffer.new('something')
result1 = (x << ' else ') # => 'something else'
result2 = (x.append= ('entirely')) # => 'entirely'
In the second example, the return value from the call is the value that was
passed in (Ruby's standard behavior for assignments in general). The return
value of append= is silently dropped on the floor.
Note that this will never be observed by users of the built-in ERB template
parser, since it automatically grabs @output_buffer in the Erubis postamble.
--Matt Jones
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" 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-core?hl=en.