Skip to content

Commit fe56b91

Browse files
committed
pattern OR syntax
1 parent bc35791 commit fe56b91

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

+stdlib/+python/is_mount.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
if ~stdlib.exists(filepath), return, end
1212

1313
% some Python on CI needs this. Didn't replicate on local Windows PC.
14-
if ispc() && strcmp(filepath, stdlib.root_name(filepath)) && ~endsWith(filepath, ["/", "\"])
14+
if ispc() && strcmp(filepath, stdlib.root_name(filepath)) && ~endsWith(filepath, "/" | filesep)
1515
y = false;
1616
return
1717
end

+stdlib/ini2struct.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
function i = is_comment(line)
5353
% a comment line detected
5454

55-
i = isempty(line) || startsWith(line, [";", "#"]);
55+
i = isempty(line) || startsWith(line, ";" | "#");
5656

5757
end
5858

+stdlib/join.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
elseif ~stdlib.strempty(rdo)
1818

1919
if ~stdlib.strempty(rnb)
20-
if endsWith(rnb, ["/", filesep])
20+
if endsWith(rnb, "/" | filesep)
2121
p = rnb + other;
2222
else
2323
p = rnb + "/" + other;
@@ -29,7 +29,7 @@
2929
elseif ~stdlib.strempty(base)
3030

3131
if ~stdlib.strempty(other)
32-
if endsWith(base, ["/", filesep])
32+
if endsWith(base, "/" | filesep)
3333
p = base + other;
3434
else
3535
p = base + "/" + other;

+stdlib/root_dir.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
r = repmat("", size(p));
1717

18-
i = startsWith(p, ["/", filesep]);
18+
i = startsWith(p, "/" | filesep);
1919
r(i) = extractBefore(p(i), 2);
2020

2121
if ispc()

find_compiler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
if isempty(p)
2222
p = getenv("MINGWROOT");
2323
end
24-
if ~endsWith(p, ["bin", "bin/"])
24+
if ~endsWith(p, "bin" | "bin/")
2525
p = p + "/bin";
2626
end
2727
else

private/get_compiler.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
shell = "set PATH=" + fileparts(comp) + pathsep + "%PATH%";
4242
end
4343
else
44-
if startsWith(co.ShortName, ["INTEL", "MSVC"])
44+
if startsWith(co.ShortName, "INTEL" | "MSVC")
4545
shell = join([strcat('"',string(co.Details.CommandLineShell),'"'), ...
4646
co.Details.CommandLineShellArg], " ");
4747
elseif startsWith(co.ShortName, "mingw64")

0 commit comments

Comments
 (0)