DEV: Compatibility with TruffleRuby (#16641)

This commit is contained in:
Gerhard Schlager 2022-05-05 03:50:02 +02:00 committed by GitHub
parent 80d2888222
commit 8442a07c13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server")
if !ENV["RAILS_ENV"] && (ARGV[0] == "s" || ARGV[0] == "server") && Process.respond_to?(:fork)
ENV["UNICORN_PORT"] ||= "3000"
if ARGV[1] == "-p" && (port = ARGV[2].to_i) > 0

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
# If Mini Profiler is included via gem
if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler
if Rails.configuration.respond_to?(:load_mini_profiler) && Rails.configuration.load_mini_profiler && RUBY_ENGINE == "ruby"
require 'rack-mini-profiler'
require 'stackprof'

View File

@ -13,7 +13,7 @@ if ENV['COVERAGE']
end
require 'rubygems'
require 'rbtrace'
require 'rbtrace' if RUBY_ENGINE == "ruby"
require 'pry'
require 'pry-byebug'
require 'pry-rails'