Skip to content

Commit

Permalink
Test platform's version-ness consistently
Browse files Browse the repository at this point in the history
The symmetry with the "for command line" case is made more apparent.
  • Loading branch information
lloeki authored and deivid-rodriguez committed Aug 21, 2022
1 parent 6b3a5a9 commit ab85d35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/platform.rb
Expand Up @@ -70,7 +70,7 @@ def initialize(arch)
when String then
arch = arch.split "-"

if arch.length > 2 && arch.last !~ (/\d/) # reassemble x86-linux-gnu
if arch.length > 2 && arch.last !~ /\d+(\.\d+)?$/ # reassemble x86-linux-{libc}
extra = arch.pop
arch.last << "-#{extra}"
end
Expand Down

0 comments on commit ab85d35

Please sign in to comment.