Ruby
メモメモるびま require "rbconfig" osn = Config::CONFIG["target_os"].downcase @@os = osn =~ /mswin(?!ce)|mingw|cygwin|bccwin/ ? "win" : (osn =~ /linux/ ? "linux" : "other") p @@os Ubuntuでの実行結果 "linux"
メモメモるびま require "rbconfig" osn = Config::CONFIG["target_os"].downcase @@os = osn =~ /mswin(?!ce)|mingw|cygwin|bccwin/ ? "win" : (osn =~ /linux/ ? "linux" : "other") p @@os Ubuntuでの実行結果 "linux"