-
-
Save AlexDaniel/3882bc44b0b34def762aeb949035a59c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6; | |
use Test; | |
use Email::Simple; | |
sub is-weird($a) { $a.NFC.Str !eq $a } | |
my $a = buggy-str() ~ “\n\r”; | |
say ‘Is weird: ’, is-weird($a); | |
dd $a; | |
say $a eq “: \n\r\n\r”; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Is weird: True | |
Str $a = ": \n\r\n\r" | |
False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit class Email::Simple; | |
sub buggy-str is export { | |
my $z = ‘’; ‘: ’ ~ $z ~ “\n\r” | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment