Ruby 4.0 リファレンスマニュアル

singleton method Gem::Platform.sort_priority

sort_priority(platform) -> IntegerRuby 3.1 から[permalink][rdoc][edit]

ソートする際に platform を優先させるための整数を返します。

platform が Gem::Platform::RUBY であれば -1 を、そうでなければ 1 を返します。値が小さいほど優先順位が高いことを表します。

[PARAM] platform:
優先順位を調べたい Gem::Platform のインスタンスを指定します。
p Gem::Platform.sort_priority(Gem::Platform::RUBY)               # => -1
p Gem::Platform.sort_priority(Gem::Platform.new("x86_64-linux")) # => 1