[rubygems/rubygems] Restore treating "--" as an unknown platform

Rather than crashing when parsing it.

aa0064e4c7
This commit is contained in:
David Rodríguez 2025-07-16 18:29:13 +02:00 committed by Hiroshi SHIBATA
parent 45b53c0be1
commit 851a3e7724
2 changed files with 3 additions and 1 deletions

View file

@ -90,7 +90,7 @@ class Gem::Platform
when String then
cpu, os = arch.sub(/-+$/, "").split("-", 2)
@cpu = if cpu.match?(/i\d86/)
@cpu = if cpu&.match?(/i\d86/)
"x86"
else
cpu