Skip to content

Commit

Permalink
convert Rails version string to Gem::Version
Browse files Browse the repository at this point in the history
  • Loading branch information
octokatherine committed Oct 25, 2023
1 parent 5f7808d commit 089d112
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.subscribe(

subscriber_object = ::ActiveSupport::Notifications.subscribe(pattern, subscriber)

if Rails.version < Gem::Version.new('7.2')
if Gem::Version.new(Rails.version) < Gem::Version.new('7.2')
::ActiveSupport::Notifications.notifier.synchronize do
subscribers = ::ActiveSupport::Notifications.notifier.instance_variable_get(:@string_subscribers)[pattern]

Expand Down

0 comments on commit 089d112

Please sign in to comment.