Sha256: c36b5b1b194e2903c18dc52b70c2c3a47de6c08ae2e328b441f3ecb0f2d3e8b1

Contents?: true

Size: 730 Bytes

Versions: 19

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

# This file can be loaded independently of puma.rb, so it cannot have any code
# that assumes puma.rb is loaded.


module Puma
  # @version 5.2.1
  HAS_FORK = ::Process.respond_to? :fork

  IS_JRUBY = Object.const_defined? :JRUBY_VERSION

  IS_OSX = RUBY_PLATFORM.include? 'darwin'

  IS_WINDOWS = !!(RUBY_PLATFORM =~ /mswin|ming|cygwin/) ||
    IS_JRUBY && RUBY_DESCRIPTION.include?('mswin')

  # @version 5.2.0
  IS_MRI = (RUBY_ENGINE == 'ruby' || RUBY_ENGINE.nil?)

  def self.jruby?
    IS_JRUBY
  end

  def self.osx?
    IS_OSX
  end

  def self.windows?
    IS_WINDOWS
  end

  # @version 5.0.0
  def self.mri?
    IS_MRI
  end

  # @version 5.0.0
  def self.forkable?
    HAS_FORK
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
puma-5.6.9-java lib/puma/detect.rb
puma-5.6.9 lib/puma/detect.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/puma-5.6.8/lib/puma/detect.rb
puma-5.6.8-java lib/puma/detect.rb
puma-5.6.8 lib/puma/detect.rb
puma-5.6.7-java lib/puma/detect.rb
puma-5.6.7 lib/puma/detect.rb
puma-5.6.6-java lib/puma/detect.rb
puma-5.6.6 lib/puma/detect.rb
puma-5.6.5-java lib/puma/detect.rb
puma-5.6.5 lib/puma/detect.rb
puma-5.6.4-java lib/puma/detect.rb
puma-5.6.4 lib/puma/detect.rb
puma-5.6.2-java lib/puma/detect.rb
puma-5.6.2 lib/puma/detect.rb
puma-5.6.1-java lib/puma/detect.rb
puma-5.6.1 lib/puma/detect.rb
puma-5.6.0-java lib/puma/detect.rb
puma-5.6.0 lib/puma/detect.rb