DEV: Correct the ruby version check (#12551)

Makes it Ruby 3 compatible.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
This commit is contained in:
tison 2021-03-30 15:44:53 +08:00 committed by GitHub
parent 2579127091
commit 21b4fef175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
# note, we require 2.5.2 and up cause 2.5.1 had some mail bugs we no longer
# monkey patch, so this avoids people booting with this problem version
begin
if !RUBY_VERSION.match?(/^2\.(([67])|(5\.[2-9]))/)
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.2")
STDERR.puts "Discourse requires Ruby 2.5.2 or up"
exit 1
end