Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[GGE::Perl6Regex] check .Bool rather than .defined

The code was the way it was because it turns out that Nil is defined in
Rakudo, whereas it should be undefined. The solution employed involved
descending into some nodes twice, which caused other problems. The solution
new employed simply checks for boolean truth... which should work in all
cases. I think.
  • Loading branch information...
commit 71c611a572bcfcda31a9646e2e6378156aeef833 1 parent a38e8db
Carl Mäsak authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  lib/GGE/Perl6Regex.pm
6  lib/GGE/Perl6Regex.pm
@@ -637,9 +637,9 @@ class GGE::Perl6Regex {
637 637
         $exp.clear;
638 638
         for @old-children -> $old-child {
639 639
             my $new-child = perl6exp($old-child, %pad);
640  
-            # RAKUDO: Storing the result into a variable causes it to become
641  
-            #         defined.
642  
-            if defined perl6exp($old-child, %pad) {
  640
+            # XXX: Should really be testing definedness, like PGE. Not sure
  641
+            #      that it matters, though.
  642
+            if $new-child {
643 643
                 $exp.push($new-child);
644 644
             }
645 645
         }

0 notes on commit 71c611a

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