From e5568aa5023843c6e1cbd6e845a3bfe735b81486 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Sun, 12 Aug 2018 10:34:04 +0200 Subject: [PATCH] Make sure we call .words on stringified var By taking out the call to Stringy in the infix:<~> handling, any variable would be directly exposed to having ".words" called upon it in << >> post-processing. This works for IO::Paths, but doesn't work for many other classes: $ perl6 -e 'class A {}; my $a = A.new; dd << foo $a >>' No such method 'words' for invocant of type 'A' Fixed this by inserting a stringification for this particular case of quotewords processing. Fixes R#2203 --- src/Perl6/Actions.nqp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp index 9764398c21a..6911e811e01 100644 --- a/src/Perl6/Actions.nqp +++ b/src/Perl6/Actions.nqp @@ -10509,7 +10509,11 @@ class Perl6::QActions is HLL::Actions does STDActions { :op('callmethod'), :name('words'), :node($/), - $node, + QAST::Op.new( + :op('callmethod'), + :name('Stringy'), + $node + ), QAST::IVal.new( :value(1), :named('autoderef') ) ) )