tap
tap copied to clipboard
match_platform must be updated
http://bka-bonn.de/wordpress/index.php/2009/06/01/determine-os-with-ruby/ (see comments)
require ‘rbconfig’
puts RbConfig::CONFIG[’target_os’]
=> “linux”
This is where the update needs to happen.
def match_platform?(*platforms)
platforms.each do |platform|
platform.to_s =~ /^(non_)?(.*)/
non = true if $1
match_platform = !RUBY_PLATFORM.index($2).nil?
return false unless (non && !match_platform) || (!non && match_platform)
end
true
end