Skip to content

Commit

Permalink
[Yapsi] unbroke an error in smartmatching
Browse files Browse the repository at this point in the history
There were some Any() objects that ended up in an array expecting only
Str. Fixed the symptom.
  • Loading branch information
Carl Masak committed Aug 14, 2010
1 parent 542b528 commit c2f5490
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Yapsi.pm
Expand Up @@ -360,7 +360,10 @@ class Closure {

sub new-lexpad-from(@sic, $line is copy, Lexpad $outer?) {
my @vars;
while @sic[++$line] ~~ / ' `' (\S*) \s+ \'(<-[']>+)\' / {
# RAKUDO: Some Any()s seem to end up in the @sic array. Hence the
# need for prefix:<~>. Would be interesting to learn where
# this happens.
while ~@sic[++$line] ~~ / ' `' (\S*) \s+ \'(<-[']>+)\' / {
given $0 {
when "var" { push @vars, ~$1 }
default { die "Unknown directive $0"; }
Expand Down

0 comments on commit c2f5490

Please sign in to comment.