From 615f79be3cef210c26b967f06979ed464bf9e178 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Tue, 24 Nov 2020 13:52:13 +0100 Subject: [PATCH] [rubygems/rubygems] Test platform's version-ness consistently The symmetry with the "for command line" case is made more apparent. https://github.com/rubygems/rubygems/commit/ab85d3558f --- lib/rubygems/platform.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rubygems/platform.rb b/lib/rubygems/platform.rb index ed3571dbff9316..0c0520e1db4014 100644 --- a/lib/rubygems/platform.rb +++ b/lib/rubygems/platform.rb @@ -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