diff --git a/src/core/Block.pm6 b/src/core/Block.pm6 index abdefaef0c9..430f2cdf47b 100644 --- a/src/core/Block.pm6 +++ b/src/core/Block.pm6 @@ -78,7 +78,7 @@ my class Block { # declared in BOOTSTRAP } # helper method for array slicing - method pos(Block:D $self: \list) { + method POSITIONS(Block:D $self: \list) { nqp::if( (nqp::istype( (my \n := nqp::getattr( diff --git a/src/core/WhateverCode.pm6 b/src/core/WhateverCode.pm6 index 30048bba009..74e41effe5e 100644 --- a/src/core/WhateverCode.pm6 +++ b/src/core/WhateverCode.pm6 @@ -1,7 +1,7 @@ my class WhateverCode is Code { # helper method for array slicing - method pos(WhateverCode:D $self: \list) { + method POSITIONS(WhateverCode:D $self: \list) { my \signature := nqp::getattr($self,Code,'$!signature'); my \count := nqp::getattr(signature,Signature,'$!count'); nqp::if( diff --git a/src/core/array_slice.pm6 b/src/core/array_slice.pm6 index 623fd4d13d5..f18cd4ee0cd 100644 --- a/src/core/array_slice.pm6 +++ b/src/core/array_slice.pm6 @@ -343,13 +343,13 @@ multi sub postcircumfix:<[ ]>(\SELF, Iterable:D \pos, Bool() :$v!, *%other) is r multi sub postcircumfix:<[ ]>(\SELF, Callable:D $block ) is raw { nqp::stmts( (my $*INDEX = 'Effective index'), - SELF[$block.pos(SELF)] + SELF[$block.POSITIONS(SELF)] ) } multi sub postcircumfix:<[ ]>(\SELF, Callable:D $block, Mu \assignee ) is raw { nqp::stmts( (my $*INDEX = 'Effective index'), - SELF[$block.pos(SELF)] = assignee + SELF[$block.POSITIONS(SELF)] = assignee ) } multi sub postcircumfix:<[ ]>(\SELF, Callable:D $block, :$BIND!) is raw { @@ -359,7 +359,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$delete!,*%other) nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'delete', $delete, %other ), SLICE_MORE_LIST( SELF, @$pos, 'delete', $delete, %other ) ) @@ -369,7 +369,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$exists!,*%other) nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'exists', $exists, %other ), SLICE_MORE_LIST( SELF, @$pos, 'exists', $exists, %other ) ) @@ -379,7 +379,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$kv!,*%other) is r nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'kv', $kv, %other ), SLICE_MORE_LIST( SELF, @$pos, 'kv', $kv, %other ) ) @@ -389,7 +389,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$p!,*%other) is ra nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'p', $p, %other ), SLICE_MORE_LIST( SELF, @$pos, 'p', $p, %other ) ) @@ -399,7 +399,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$k!,*%other) is ra nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'k', $k, %other ), SLICE_MORE_LIST( SELF, @$pos, 'k', $k, %other ) ) @@ -409,7 +409,7 @@ multi sub postcircumfix:<[ ]>(\SELF,Callable:D $block,Bool() :$v!,*%other) is ra nqp::stmts( (my $*INDEX = 'Effective index'), nqp::if( - nqp::istype((my $pos := $block.pos(SELF)),Int), + nqp::istype((my $pos := $block.POSITIONS(SELF)),Int), SLICE_ONE_LIST( SELF, $pos, 'v', $v, %other ), SLICE_MORE_LIST( SELF, @$pos, 'v', $v, %other ) )