Skip to content

Commit

Permalink
Hacky fix for R#2686
Browse files Browse the repository at this point in the history
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 9d6e508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/Rakudo/Internals.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9d6e508

Please sign in to comment.