Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replaced \e by \c[27]
Rakudo has regressed and no longer recognizes \e. [RT #75244]
  • Loading branch information
Carl Masak committed May 21, 2010
1 parent 686e6ed commit e87e6a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/GGE/Perl6Regex.pm
Expand Up @@ -26,7 +26,7 @@ class GGE::Perl6Regex {
my %esclist =
'h' => $h-whitespace,
'v' => $v-whitespace,
'e' => "\e",
'e' => "\c[27]", # RAKUDO: No "\e". [RT #75244]
'f' => "\f",
'r' => "\r",
't' => "\t",
Expand Down
3 changes: 2 additions & 1 deletion t/perl6regex/01-regex.t
Expand Up @@ -88,7 +88,8 @@ sub backslash_escape($string) {
# RAKUDO: No .trans again yet
#return $string.trans(['\n', '\r', '\e', '\t', '\f'] =>
# ["\n", "\r", "\e", "\t", "\f"])\
return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\e", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
# RAKUDO: No "\e". [RT #75244]
return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\c[27]", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
}

done_testing;
3 changes: 2 additions & 1 deletion test-regex
Expand Up @@ -26,5 +26,6 @@ sub backslash_escape($string) {
# RAKUDO: No .trans again yet
#return $string.trans(['\n', '\r', '\e', '\t', '\f'] =>
# ["\n", "\r", "\e", "\t", "\f"])\
return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\e", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
# RAKUDO: No \e. [RT #75244]
return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\c[27]", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
}

0 comments on commit e87e6a6

Please sign in to comment.