Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
No longer require experimental for $*COLLATION.set
  • Loading branch information
zoffixznet committed Oct 28, 2018
1 parent f81146a commit 20c41ca
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
7 changes: 6 additions & 1 deletion lib/experimental.pm6
Expand Up @@ -193,7 +193,12 @@ package EXPORT::pack {
}

package EXPORT::collation {
OUR::<EXPERIMENTAL-COLLATION> := True;
# this is no longer experimental, but keep the package to prevent
# code that caters to this and earlier versions of compilers from
# breaking
#
# XXX TODO: should be fine to remove on 2019-12. There is also a test
# in t/02-rakudo/99-misc.t that will need to be removed too at the time
}

# vim: ft=perl6 expandtab sw=4
4 changes: 0 additions & 4 deletions src/core/Collation.pm6
Expand Up @@ -12,10 +12,6 @@ class Collation {
Int :$tertiary = 1,
Int :$quaternary = 1)
{
nqp::isnull(nqp::getlexcaller('EXPERIMENTAL-COLLATION')) and X::Experimental.new(
feature => 'the $*COLLATION dynamic variable',
use => 'collation'
).throw;
my int $i = 0;
$i += 1 if $primary.sign == 1;
$i += 2 if $primary.sign == -1;
Expand Down
12 changes: 11 additions & 1 deletion t/02-rakudo/99-misc.t
Expand Up @@ -2,7 +2,7 @@ use lib <t/packages/>;
use Test;
use Test::Helpers;

plan 7;
plan 8;

subtest '.lang-ver-before method on Perl6::World' => {
plan 5;
Expand Down Expand Up @@ -135,3 +135,13 @@ subtest 'postfix-to-prefix-inc-dec opt does not rewrite custom ops' => {
is-deeply @res, [<a a b b>],
'regex blocks update their lexical variables right';
}

group-of 2 => 'collation experiment' => {
is-run $*COLLATION.set: :primary; print 'pass',
:out<pass>, '$*COLLECTION.set no longer requires experimental pragma';
is-run
use experimental :collation;
$*COLLATION.set: :primary;
print 'pass'
, :out<pass>, 'we can still use the pragma (to support old code)';
}

0 comments on commit 20c41ca

Please sign in to comment.