Create an actual patch by using the diff statement in Unix.
Secondly, the benchmarks are funny that way. Mostly, its because each
template is *really* fast to render and the small hiccups and
processor-cache issues going on inside of your computer make a huge
difference when stretched over the entire benchmark suite.
If its any reason beyond this, I'd love to hear the reasons.
-hampton.
On 10/20/07, Dylan Bruzenak <[EMAIL PROTECTED]> wrote:
>
> I was familiarizing myself with the Haml engine code and came across
> this untested negative case. I had assumed that this would throw
> "Illegal element: classes and ids must have values."
>
> The problem is with the
>
> if !attributes.empty? && '.#'.include?(attributes)
>
> check on line 729 of haml/engine.rb.
>
> This only checks for attributes of length 1 (which should be invalid
> in every case, right, not just the above, since attributes include the
> '.' or '#' qualifier).
>
> This fixes the problem:
>
> if !attributes.empty? && (attributes.length == 1 || attributes =~ /[.#]
> [.#\{]/)
>
> Then add "%p..class" to the list of syntax errors in engine_test.rb.
>
> Assuming I'm not missing something; which I probably am. What is the
> best way to contribute changes ?
>
> On an aside, I'm getting about 33% variance between different runs of
> the benchmark utility. Any idea what is going on there ?
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---