Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Last active August 18, 2017 22:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexDaniel/3882bc44b0b34def762aeb949035a59c to your computer and use it in GitHub Desktop.
Save AlexDaniel/3882bc44b0b34def762aeb949035a59c to your computer and use it in GitHub Desktop.
#!/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”;
Is weird: True
Str $a = ": \n\r\n\r"
False
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