From fdb2a74b4f8bf028222c8e119a93ff91e7594745 Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 14 May 2024 21:20:20 -0400 Subject: [PATCH] ensure Rails::VERSION is defined (#191) --- lib/rack-timeout.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rack-timeout.rb b/lib/rack-timeout.rb index 999abcf..baaca9a 100644 --- a/lib/rack-timeout.rb +++ b/lib/rack-timeout.rb @@ -1,2 +1,2 @@ require_relative "rack/timeout/base" -require_relative "rack/timeout/rails" if defined?(Rails) && Rails::VERSION::MAJOR >= 3 +require_relative "rack/timeout/rails" if defined?(Rails) && Rails.const_defined?(:VERSION) && Rails::VERSION::MAJOR >= 3