Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

replaced \e by \c[27]

Rakudo has regressed and no longer recognizes \e. [RT #75244]
  • Loading branch information...
commit e87e6a6bb6c08f6a799a66a4d0c1b16f9ba46406 1 parent 686e6ed
Carl Mäsak authored May 22, 2010
2  lib/GGE/Perl6Regex.pm
@@ -26,7 +26,7 @@ class GGE::Perl6Regex {
26 26
     my %esclist =
27 27
         'h' => $h-whitespace,
28 28
         'v' => $v-whitespace,
29  
-        'e' => "\e",
  29
+        'e' => "\c[27]", # RAKUDO: No "\e". [RT #75244]
30 30
         'f' => "\f",
31 31
         'r' => "\r",
32 32
         't' => "\t",
3  t/perl6regex/01-regex.t
@@ -88,7 +88,8 @@ sub backslash_escape($string) {
88 88
     # RAKUDO: No .trans again yet
89 89
     #return $string.trans(['\n', '\r', '\e', '\t', '\f'] =>
90 90
     #                     ["\n", "\r", "\e", "\t", "\f"])\
91  
-    return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\e", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
  91
+    # RAKUDO: No "\e". [RT #75244]
  92
+    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);
92 93
 }
93 94
 
94 95
 done_testing;
3  test-regex
@@ -26,5 +26,6 @@ sub backslash_escape($string) {
26 26
     # RAKUDO: No .trans again yet
27 27
     #return $string.trans(['\n', '\r', '\e', '\t', '\f'] =>
28 28
     #                     ["\n", "\r", "\e", "\t", "\f"])\
29  
-    return replace_x $string.subst(/\\n/, "\n", :g).subst(/\\r/, "\r", :g).subst(/\\e/, "\e", :g).subst(/\\t/, "\t", :g).subst(/\\f/, "\f", :g);
  29
+    # RAKUDO: No \e. [RT #75244]
  30
+    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);
30 31
 }

0 notes on commit e87e6a6

Please sign in to comment.
Something went wrong with that request. Please try again.