Skip to content

Commit

Permalink
Remove extra info from $?FILE from the end
Browse files Browse the repository at this point in the history
As we actually can have parentheses as part of a valid path.
  • Loading branch information
lizmat committed Feb 15, 2020
1 parent c0e8091 commit 5629cdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Perl6/World.nqp
Expand Up @@ -1403,7 +1403,7 @@ class Perl6::World is HLL::World {
# to be free of extraneous information. See
# https://github.com/rakudo/rakudo/issues/2539 for the
# whole story.
my $index := nqp::index($file,' (');
my $index := nqp::rindex($file,' (');
$file := nqp::substr($file,0,$index) if $index != -1;

$file := nqp::cwd ~ '/' ~ $file
Expand Down
2 changes: 1 addition & 1 deletion src/core.c/CallFrame.pm6
Expand Up @@ -38,7 +38,7 @@ my class CallFrame {
# https://github.com/rakudo/rakudo/issues/2539 for the
# whole story.
if $raw && nqp::atkey($!annotations,'file') -> $file {
my int $index = nqp::index($file,' (');
my int $index = nqp::rindex($file,' (');
$index == -1 ?? $file !! nqp::substr($file,0,$index)
}
else {
Expand Down

0 comments on commit 5629cdf

Please sign in to comment.