Skip to content

Commit

Permalink
Streamline expression in lib/arch.rb
Browse files Browse the repository at this point in the history
Previously this triggered an infinite loop in rubocop, but we just had
the opportunity (given the `standard` gem) to upgrade to the newest
version that fixes it.

I reported that bug: rubocop/rubocop#12307
  • Loading branch information
fdr committed Nov 8, 2023
1 parent bce30c9 commit 476dc45
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rhizome/common/lib/arch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@

ArchClass = Struct.new(:sym) {
def self.from_system
sym = case RbConfig::CONFIG.fetch("target_cpu").downcase
new case RbConfig::CONFIG.fetch("target_cpu").downcase
when /arm64|aarch64/
"arm64"
when /amd64|x86_64|x64/
"x64"
else
fail "BUG: could not detect architecture"
end.intern
new sym
end

def arm64?
Expand Down

0 comments on commit 476dc45

Please sign in to comment.