Open p6rt opened 7 years ago
IRC: https://irclog.perlgeek.de/perl6-dev/2017-05-28#i_14648548
The first eval uses emoji cat in a string and it works;
The second one tries to do the same in a bit more elaborate eval and it crashes with bogus term error;
The third one executes the same code, except swapping \term:\<😹> to \x, and it works fine;
The fourth one executes the same code, except swapping \term:\<😹> to \term:\
Seems in the problematic cases, the defined \term is not seen by the block inside the string.
09:07 Zoffix m: my \term:\<😹> = -42; say 😹; say 😹.abs; say "{😹}"; my $foo = ''; say "{😹.abs}:$foo" for 😹.abs
09:07 camelia rakudo-moar 87d0e0: OUTPUT: «-4242-4242:»
09:07 Zoffix m: '/tmp/file1'.IO.spurt: "a\nb\nc"; '/tmp/file2'.IO.spurt: "d\ne\n"; '/tmp/file3'.IO.spurt: "f\ng\nh\ni"; my $line; my \term:\<😹> = IO::CatHandle.new('/tmp/file1', '/tmp/file2'.IO, '/tmp/file3'.IO.open, :on-switch{ $line = 1 }); say "{😹.path}:$line $_" for 😹.lines
09:07 camelia rakudo-moar 87d0e0: OUTPUT: «5===SORRY!5=== Error while compiling \
Migrated from rt.perl.org#131389 (status was 'new')
Searchable as RT131389$