Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Hash should be augmentable
  • Loading branch information
moritz committed Oct 1, 2011
1 parent 2512522 commit e0d5199
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S12-class/augment-supersede.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 6;
plan 7;

# L<S12/"Open vs Closed Classes"/"Otherwise you'll get a class redefinition error.">

Expand All @@ -23,6 +23,14 @@ use MONKEY_TYPING;
ok(!eval('augment class NonExistent { }'), 'augment on non-existent class dies');
}

# RT #76104
{
augment class Hash {
method foo() { self.keys };
}
is { a => 1 }.foo, 'a', 'can augment Hash';
}

# RT #66694
eval_dies_ok q[
class MethodClash { method foo() { 3 } };
Expand Down

0 comments on commit e0d5199

Please sign in to comment.