class Gem::Platform
def =~(other)
def =~(other) case other when Gem::Platform then # nop when String then # This data is from http://gems.rubyforge.org/gems/yaml on 19 Aug 2007 other = case other when /^i686-darwin(\d)/ then ["x86", "darwin", $1] when /^i\d86-linux/ then ["x86", "linux", nil] when "java", "jruby" then [nil, "java", nil] when /^dalvik(\d+)?$/ then [nil, "dalvik", $1] when /dotnet(\-(\d+\.\d+))?/ then ["universal","dotnet", $2] when /mswin32(\_(\d+))?/ then ["x86", "mswin32", $2] when /mswin64(\_(\d+))?/ then ["x64", "mswin64", $2] when "powerpc-darwin" then ["powerpc", "darwin", nil] when /powerpc-darwin(\d)/ then ["powerpc", "darwin", $1] when /sparc-solaris2.8/ then ["sparc", "solaris", "2.8"] when /universal-darwin(\d)/ then ["universal", "darwin", $1] else other end other = Gem::Platform.new other else return nil end self === other end