Skip to content

Commit

Permalink
The arch name on macOS M1 etc should be "arm64"
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon authored and andrykonchin committed Jun 7, 2024
1 parent 7f4bde7 commit 72ff3e5
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions library/rbconfig/rbconfig_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,30 @@
end
end
end

guard -> { %w[aarch64 arm64].include? RbConfig::CONFIG['host_cpu'] } do
it "['host_cpu'] returns CPU architecture properly for AArch64" do
platform_is :darwin do
RbConfig::CONFIG['host_cpu'].should == 'arm64'
end

platform_is_not :darwin do
RbConfig::CONFIG['host_cpu'].should == 'aarch64'
end
end
end

guard -> { platform_is(:linux) || platform_is(:darwin) } do
it "['host_os'] returns a proper OS name or platform" do
platform_is :darwin do
RbConfig::CONFIG['host_os'].should.match? /darwin/
end

platform_is :linux do
RbConfig::CONFIG['host_os'].should.match? /linux/
end
end
end
end

describe "RbConfig::TOPDIR" do
Expand Down

0 comments on commit 72ff3e5

Please sign in to comment.