mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 09:23:44 +08:00
DEV: Remove older ruby version logic (#19971)
Discourse no longer boots on anything less than 3.1, so these code paths will never be used
This commit is contained in:
parent
48713653df
commit
e2db764cdd
|
@ -7,15 +7,6 @@ if GlobalSetting.skip_redis?
|
|||
return
|
||||
end
|
||||
|
||||
if Rails.env.development? && RUBY_VERSION.match?(/^2\.5\.[23]/)
|
||||
STDERR.puts "WARNING: Discourse development environment runs slower on Ruby 2.5.3 or below"
|
||||
STDERR.puts "We recommend you upgrade to the latest Ruby 2.x for the optimal development performance"
|
||||
|
||||
# we have to used to older and slower version of the logger cause the new one exposes a Ruby bug in
|
||||
# the Queue class which causes segmentation faults
|
||||
Logster::Scheduler.disable
|
||||
end
|
||||
|
||||
if Rails.env.development? && !Sidekiq.server? && ENV["RAILS_LOGS_STDOUT"] == "1"
|
||||
Rails.application.config.after_initialize do
|
||||
console = ActiveSupport::Logger.new(STDOUT)
|
||||
|
|
|
@ -38,10 +38,6 @@ class SiteSettings::YamlLoader
|
|||
private
|
||||
|
||||
def load_yaml(path)
|
||||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.1.0")
|
||||
YAML.load_file(path, aliases: true)
|
||||
else
|
||||
YAML.load_file(path)
|
||||
end
|
||||
YAML.load_file(path, aliases: true)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user