haml/haml — pull request #641 by alisdair (2013-02-22 11:16:32+00:00)
Title: Data attribute flattening breaks with fixnum values

The new data attribute flattening fails when the attribute values of the data hash are identical fixnums (or other immutable objects, like symbols). This HAML:

```haml
%div{:data => {:x => 50, :y => 50}}
```

Should generate this:

```html

```

But it records the `50` value as seen, and then returns `nil` for the second result, giving:

```html

```

I think the circular reference check is only necessary for hash attribute values. Reversing the order of the type check with the seen check fixes this problem.