Skip to content

Commit

Permalink
RT #76664
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Oct 20, 2011
1 parent 6e4c316 commit ea311cc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion S05-substitution/subst.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 128;
plan 129;

# L<S05/Substitution/>

Expand Down Expand Up @@ -388,4 +388,13 @@ is '12'.subst(/(.)(.)/,{$()*2}),'24', '.. and do nifty things in closures';
is $_, 'boo', 'can use $0 in RHS of s///';
}

# RT #76664
{
class SubstInsideMethod {
method ro($_ ) { s/c// }
}

dies_ok { SubstInsideMethod.new.ro('ccc') }, '(sanely) dies when trying to s/// a read-only variable';
}

# vim: ft=perl6

0 comments on commit ea311cc

Please sign in to comment.