Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
failed S/// should return original string
fixes RT #126476
  • Loading branch information
TimToady committed Nov 7, 2015
1 parent ff9e6de commit 9e4902f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Perl6/Actions.nqp
Expand Up @@ -7034,8 +7034,15 @@ Compilation unit '$file' contained the following violations:
QAST::Op.new( :op('call'), :name('&infix:<=>'),
QAST::Var.new( :name($<sym> eq 's' ?? '$_' !! '$/'), :scope('lexical') ),
$apply_matches
)

),
( $<sym> eq 'S'
?? QAST::Op.new( :op('p6store'),
QAST::Op.new( :op('call'), :name('&infix:<,>'),
QAST::Var.new( :name('$/'), :scope('lexical') ) ),
QAST::Var.new( :name('$_'), :scope('lexical') ),
)
!! QAST::Stmt.new()
),
),

# It will return a list of matches when we match globally, and a single
Expand Down

0 comments on commit 9e4902f

Please sign in to comment.