The fix ended up being easier than I thought. It's fixed in master now.

On Wed, Jan 7, 2009 at 4:06 PM, Nathan Weizenbaum <[email protected]> wrote:

> I know why this issue exists (it's because of one of the optimizations I
> introduced) but I'm not yet sure how I want to fix it. For now, you can
> surround the if in parentheses to make it work as you expect. The issue will
> be fixed before 2.2 is released.
>
>
> On Wed, Jan 7, 2009 at 9:14 AM, Chris Eppstein <[email protected]>wrote:
>
>> Thanks for the bug report. What version of edge are you running? Have you
>> updated in the last few days?
>> git show --pretty=oneline
>>
>> will tell you.
>>
>>
>> On Wed, Jan 7, 2009 at 8:54 AM, Knack <[email protected]> wrote:
>>
>>>
>>> This bug is related to the Edge version of Haml (2.1.0)
>>>
>>> I've just cloned Haml's master branch from github, and I've noticed a
>>> strange behaviour:
>>>
>>> Suppose the following code (obviously not real code):
>>>
>>> %h1= "One"
>>> %h2= "Two" if false
>>>
>>> in previous versions, the output was:
>>>
>>> <h1>One</h1>
>>> <h2></h2>
>>>
>>> but in Edge Haml, the output is
>>>
>>> <h1>One</h1>
>>> <h2>One</h2>
>>>
>>> It seems that the result of the previously evaluated ruby code remains
>>> somewhere and the second line doesn't reset it, because of the false
>>> condition.
>>>
>>> However:
>>>
>>> %h1= "One"
>>> %h2= nil
>>>
>>> works fine and gives the expected output
>>>
>>> Hope it'll help.
>>>
>>>
>>>
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to