From 46eecdae8aeaeb799271c647d3fa63f65ccb82b8 Mon Sep 17 00:00:00 2001 From: Zoffix Znet Date: Sat, 17 Jun 2017 13:14:41 +0000 Subject: [PATCH] Micro-opt .subst call in INITIALIZE-A-DISTRO-NOW We don't need to use a regex here and Str matcher with :g will fast-path --- src/core/Distro.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Distro.pm b/src/core/Distro.pm index d05eed92c53..52829db0cbf 100644 --- a/src/core/Distro.pm +++ b/src/core/Distro.pm @@ -63,7 +63,7 @@ sub INITIALIZE-A-DISTRO-NOW() { $auth := 'Apple Computer, Inc.'; # presumably } elsif Rakudo::Internals.FILETEST-E('/etc/os-release') { - $_ := '/etc/os-release'.IO.slurp.subst(:g, /'"'/,''); + $_ := '/etc/os-release'.IO.slurp.subst(:g, '"',''); $auth := ~$0 if m/^^ HOME_URL \= (\N*) /; $name := ~$0 if m/^^ ID \= (\N*) /; $version := ~$0 if m/^^ VERSION \= (\N*) /;