Sha256: e6e942092dc31a8012756ae81f120160951bfe1b39d421d2e468c9fd44eb423f

Contents?: true

Size: 389 Bytes

Versions: 74

Compression:

Stored size: 389 Bytes

Contents

def ruby_19?
  !!(RUBY_VERSION =~ /^1.9/)
end

def ruby_18?
  !!(RUBY_VERSION =~ /^1.8/)
end

def windows?
  !!(RUBY_PLATFORM =~ /mswin|mingw|windows/)
end

# def jruby?

def unix?
  !windows?
end

def os_x?
  !!(RUBY_PLATFORM =~ /darwin/)
end

def solaris?
  !!(RUBY_PLATFORM =~ /solaris/)
end

def freebsd?
  !!(RUBY_PLATFORM =~ /freebsd/)
end

DEV_NULL = windows? ? 'NUL' : '/dev/null'

Version data entries

74 entries across 74 versions & 4 rubygems

Version Path
ohai-8.10.0 spec/support/platform_helpers.rb
ohai-8.9.0 spec/support/platform_helpers.rb
ohai-8.8.1 spec/support/platform_helpers.rb
ohai-8.8.0 spec/support/platform_helpers.rb
ohai-8.7.0 spec/support/platform_helpers.rb
ohai-8.6.0 spec/support/platform_helpers.rb
ohai-8.6.0.alpha.1 spec/support/platform_helpers.rb
ohai-8.6.0.alpha.0 spec/support/platform_helpers.rb
ohai-8.5.0 spec/support/platform_helpers.rb
ohai-8.4.0 spec/support/platform_helpers.rb
ohai-8.3.0 spec/support/platform_helpers.rb
ohai-8.3.0.rc.0 spec/support/platform_helpers.rb
ohai-8.2.0 spec/support/platform_helpers.rb
ohai-8.1.1 spec/support/platform_helpers.rb
ohai-8.1.0 spec/support/platform_helpers.rb
ohai-7.4.1 spec/support/platform_helpers.rb
ohai-8.0.1 spec/support/platform_helpers.rb
ohai-7.6.0.rc.1 spec/support/platform_helpers.rb
ohai-7.6.0.rc.0 spec/support/platform_helpers.rb
ohai-7.4.0 spec/support/platform_helpers.rb