Sha256: 515ced32ce9c818f974e19513b79692772b8f569df33f0dcb97858cf5a3f3370

Contents?: true

Size: 783 Bytes

Versions: 11

Compression:

Stored size: 783 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

  HAS_NATIVE_IO_WAIT = ::IO.public_instance_methods(false).include? :wait_readable

  IS_JRUBY = Object.const_defined? :JRUBY_VERSION

  IS_OSX = RUBY_DESCRIPTION.include? 'darwin'

  IS_WINDOWS = RUBY_DESCRIPTION.match?(/mswin|ming|cygwin/)

  IS_LINUX = !(IS_OSX || IS_WINDOWS)

  # @version 5.2.0
  IS_MRI = RUBY_ENGINE == 'ruby'

  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

11 entries across 11 versions & 3 rubygems

Version Path
puma-6.5.0-java lib/puma/detect.rb
puma-6.5.0 lib/puma/detect.rb
jun-puma-1.0.1-java lib/puma/detect.rb
jun-puma-1.0.0-java lib/puma/detect.rb
puma-6.4.3-java lib/puma/detect.rb
puma-6.4.3 lib/puma/detect.rb
tinymce-rails-7.1.2 vendor/bundle/ruby/3.3.0/gems/puma-6.4.2/lib/puma/detect.rb
puma-6.4.2-java lib/puma/detect.rb
puma-6.4.2 lib/puma/detect.rb
puma-6.4.1-java lib/puma/detect.rb
puma-6.4.1 lib/puma/detect.rb