Fixed in 90b8154.
On Fri, Jan 23, 2009 at 5:40 AM, Knack <[email protected]> wrote:
>
> In fact, maybe the fix should be:
>
> push_and_tabulate([:loud, "_erbout << #{no_format ? "#
> {temp}.to_s;" :out}"])
>
> because it only happened when "no_format" was true
>
> On 23 ene, 14:11, Knack <[email protected]> wrote:
> > I found it!
> >
> > Inhttp://github.com/nex3/haml/blob/af59d9954a149f7f5604f287ffb3721d99e8.
> ..
> >
> > change line 343 from
> >
> > push_and_tabulate([:loud, "_erbout << #{no_format ? "#{temp}.to_s" :
> > out}"])
> >
> > to
> >
> > push_and_tabulate([:loud, "_erbout << #{no_format ? "#{temp}.to_s" :
> > out};"])
> >
> > (i.e. add a semicolon)
> >
> > and it'll work.
> >
> > On 23 ene, 14:05, Knack <[email protected]> wrote:
> >
> > > It's happening also to me in Haml 2.1.0. Only in ugly mode.
> >
> > > This error is related to constructions like
> >
> > > = .... do
> > > ....
> >
> > > But only when it's at the end of the template.
> >
> > > Examples:
> >
> > > = capture_haml do
> > > Hello
> >
> > > or
> >
> > > = returning "" do |s|
> > > - s << "Hello"
> >
> > > Both examples give me the following error:
> >
> > > ActionView::TemplateError (compile error
> > > /home/.../app/views/...html.haml:3: syntax error, unexpected tIVAR,
> > > expecting kEND
> > > ...< haml_temp_0.t...@haml_buffer = @haml_buffer.upper;_erbout;
> > > ^) on line #3 of app/
> > > views/....html.haml:
> > > 1: = returning "" do |s|
> > > 2: - s << "Hello"
> >
> > > But if there's more haml code following the block, I receive instead a
> > > runtime error:
> >
> > > Example:
> > > = returning "" do |s|
> > > - s << "Hello"
> > > %p More...
> >
> > > Gives the following error:
> >
> > > ActionView::TemplateError (undefined method `to_s_erbout' for
> > > "Hello":String) on line #3 of app/views/home/....html.haml:
> > > 1: = returning "" do |s|
> > > 2: - s << "Hello"
> > > 3: %p More...
> >
> > > Looking at the portion of code showed in both errors, maybe it needs a
> > > semicolon (;) after to_s?
> >
> > > Hope it'll help.
> >
> > > On 21 ene, 07:00, Kyle Hargraves <[email protected]> wrote:
> >
> > > > On Tue, Jan 20, 2009 at 5:02 PM, Nathan Weizenbaum <[email protected]>
> wrote:
> > > > > Can you pastie the full text of your template?
> >
> > > > Ah, didn't occur to me that it was ambiguous; those two lines *are*
> > > > the full text of the partial. The template rendering it is similarly
> > > > simple, rendering this as a collection.
> >
> > > > Anyhow, I mustn't have been trying very hard earlier, because I can
> > > > boil the bug down to:
> >
> > > > def do_capture(&blk)
> > > > capture(&blk)
> > > > end
> >
> > > > = do_capture do
> > > > %h1 foo
> >
> > > > Unfortunately, I still can't reproduce that in a fresh application,
> > > > neither with edge nor the exact revision I mentioned before
> (9e2b4a1).
> > > > I will look into this more soon -- I really like ugly mode.
> >
> > > > k
> >
> >
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" 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/haml?hl=en
-~----------~----~----~----~------~----~------~--~---