Skip to content

Commit

Permalink
Obscurize words-autoderef a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Sep 5, 2018
1 parent 9295116 commit ae739ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Perl6/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -10484,7 +10484,7 @@ class Perl6::QActions is HLL::Actions does STDActions {
else {
$past := QAST::Op.new(
:op('callmethod'),
:name('words-autoderef'),
:name('WORDS_AUTODEREF'),
:node($/),
$past
);
Expand Down Expand Up @@ -10515,7 +10515,7 @@ class Perl6::QActions is HLL::Actions does STDActions {
:name('Slip'),
QAST::Op.new(
:op('callmethod'),
:name('words-autoderef'),
:name('WORDS_AUTODEREF'),
:node($/),
QAST::Op.new(
:op('callmethod'),
Expand Down
2 changes: 1 addition & 1 deletion src/core/Str.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ my class Str does Stringy { # declared in BOOTSTRAP
multi method words(Str:D:) { Seq.new(Words.new(self)) }

# Internal method, used in Actions.postprocess_words/postprocess_quotewords
method words-autoderef(Str:D:) {
method WORDS_AUTODEREF(Str:D:) {
Words.new(self).push-all(my $words := nqp::create(IterationBuffer));
nqp::elems($words) == 1
?? nqp::shift($words)
Expand Down

0 comments on commit ae739ad

Please sign in to comment.