Skip to content
Permalink
Browse files

Hacky fix for R#2686

Compilation complained about IO::Glob not having a "flat" method.  This is
strange, as IO::Glob does Iterable, and the Iterable role provides a "flat"
method.

The "flat" method was called during the setting up of the export of "glob"
in Rakudo::Internals.  Since this code predates the GLR, and the intent seemed
to be to iterate over whatever is in @*PACKAGES, it felt appropriate to
replace the "flat" by a ".list".  This spectests clean and unbreaks IO::Glob.
As to the deeper reason of why this worked, I have no idea.
  • Loading branch information...
lizmat committed Feb 12, 2019
1 parent b394b63 commit 9d6e508d0d4b3fd2e36cc0b2d302eb10f63e854d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/Rakudo/Internals.pm6
@@ -127,7 +127,7 @@ my class Rakudo::Internals {

method EXPORT_SYMBOL(\exp_name, @tags, Mu \sym) {
my @export_packages = $*EXPORT;
for flat nqp::hllize(@*PACKAGES) {
for nqp::hllize(@*PACKAGES).list {
unless .WHO.EXISTS-KEY('EXPORT') {
.WHO<EXPORT> := Metamodel::PackageHOW.new_type(:name('EXPORT'));
.WHO<EXPORT>.^compose;

0 comments on commit 9d6e508

Please sign in to comment.
You can’t perform that action at this time.