Skip to content

Commit f70f67c

Browse files
committed
Math::Complex: remove redundant \s* before $gre
$gre already includes leading whitespace.
1 parent 1c29794 commit f70f67c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dist/Math-Complex/lib/Math/Complex.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ sub _make {
204204
($p, $q) = ($1, 0);
205205
} elsif ($arg =~ /^(?:$gre)?$gre\s*i\s*$/) {
206206
($p, $q) = ($1 || 0, $2);
207-
} elsif ($arg =~ /^\s*\(\s*$gre\s*(?:,\s*$gre\s*)?\)\s*$/) {
207+
} elsif ($arg =~ /^\s*\($gre\s*(?:,$gre\s*)?\)\s*$/) {
208208
($p, $q) = ($1, $2 || 0);
209209
}
210210

@@ -222,13 +222,13 @@ sub _emake {
222222
my $arg = shift;
223223
my ($p, $q);
224224

225-
if ($arg =~ /^\s*\[\s*$gre\s*(?:,\s*$gre\s*)?\]\s*$/) {
225+
if ($arg =~ /^\s*\[$gre\s*(?:,$gre\s*)?\]\s*$/) {
226226
($p, $q) = ($1, $2 || 0);
227-
} elsif ($arg =~ m!^\s*\[\s*$gre\s*(?:,\s*([-+]?\d*\s*)?pi(?:/\s*(\d+))?\s*)?\]\s*$!) {
227+
} elsif ($arg =~ m!^\s*\[$gre\s*(?:,\s*([-+]?\d*\s*)?pi(?:/\s*(\d+))?\s*)?\]\s*$!) {
228228
($p, $q) = ($1, ($2 eq '-' ? -1 : ($2 || 1)) * pi() / ($3 || 1));
229-
} elsif ($arg =~ /^\s*\[\s*$gre\s*\]\s*$/) {
229+
} elsif ($arg =~ /^\s*\[$gre\s*\]\s*$/) {
230230
($p, $q) = ($1, 0);
231-
} elsif ($arg =~ /^\s*$gre\s*$/) {
231+
} elsif ($arg =~ /^$gre\s*$/) {
232232
($p, $q) = ($1, 0);
233233
}
234234

0 commit comments

Comments
 (0)