On Sat, 30 Apr 2016 11:16:44 -0700, barto...@gmx.de wrote:
> Starting with rakudo commit fe2be65806 two tests in S16-io/supply.t
> start to fail with rakudo-j. The following rakudo commit 463e7589a1
> seems to change the code path for the tests in question, but also
> makes them fail. Only if one reverts both commits, the tests pass
> again.
> 
> The following code is a shortened version of one of the failing tests.
> Probably it could be golfed further.
> 
> $ perl6-j -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s =
> $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my
> $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y'
> Buf[uint8]:0x<61>
> Buf[uint8]:0x<61>
> False
> 
> On rakudo-m the last comparison returns True:
> 
> $ perl6-m -e 'my $f = "foo"; spurt($f,"a"); my $h = open($f); my $s =
> $h.Supply(:size(1),:bin); my $x; $s.tap( { $x = $_ } ); $h.close; my
> $y = Buf[uint8].new(ord "a"); say $x; say $y; say $x eqv $y'
> Buf[uint8]:0x<61>
> Buf[uint8]:0x<61>
> True


Golfed it a bit (buf8 is what the Supply uses):

<Zoffix> r: dd buf8 eqv Buf[uint8]
<camelia> rakudo-moar 0c6281: OUTPUT: «Bool::True␤»
<camelia> ..rakudo-jvm fb4f16: OUTPUT: «Bool::False␤»

Reply via email to