diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-07 20:16:23 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-07 20:28:39 -0700 |
commit | 01b5ef509f2ebf466fd7de2c1e7406717bb14332 (patch) | |
tree | 5dbd28d948e2a7f1bd8030b4a0e69016391490d0 /t/op/sort.t | |
parent | 1cb2b5d4ff78efbd407ee199ed0ed9ff0227cecb (diff) | |
download | perl-01b5ef509f2ebf466fd7de2c1e7406717bb14332.tar.gz |
[perl #24482] Fix sort and require to treat CORE:: as keyword
Diffstat (limited to 't/op/sort.t')
-rw-r--r-- | t/op/sort.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/sort.t b/t/op/sort.t index 03d2ce1c69..ca749a063b 100644 --- a/t/op/sort.t +++ b/t/op/sort.t @@ -6,7 +6,7 @@ BEGIN { require 'test.pl'; } use warnings; -plan( tests => 176 ); +plan( tests => 177 ); # these shouldn't hang { @@ -119,6 +119,10 @@ cmp_ok("@b",'eq','1 2 3 4','map then sort'); cmp_ok("@b",'eq','1 2 3 4','reverse then sort'); +@b = sort CORE::reverse (4,1,3,2); +cmp_ok("@b",'eq','1 2 3 4','CORE::reverse then sort'); + + sub twoface { no warnings 'redefine'; *twoface = sub { $a <=> $b }; &twoface } eval { @b = sort twoface 4,1,3,2 }; |