Closed schneiderfelipe closed 3 years ago
Thanks @schneiderfelipe!
I think you should be able to test this by choosing an AbstractArray
from Base
that is other than the concrete type Array
. A BitVector
, for example:
julia> BitArray([0, 0, 1, 1, 0])
5-element BitVector:
0
0
1
1
0
julia> BitArray([0, 0, 1, 1, 0]) isa Array
false
@yurivish Nice! I added a test with BitVector
.
I had to add an extra case for AbstractRange
s, as they are AbstractArray
s as well, in order to avoid flattening:
julia> using Hyperscript
julia> const p = m("p")
<p></p>
julia> p([1, 2, 3])
<p>123</p>
julia> p(BitVector([0, 1, 0]))
<p>falsetruefalse</p>
julia> p(1:3)
<p>1:3</p>
That's a good thought. Thanks for working on this!
Fix #30.
@yurivish I could add a test for this if you like, but that would probably add an extra test dependency.