Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created November 6, 2013 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/7346220 to your computer and use it in GitHub Desktop.
Save tenderlove/7346220 to your computer and use it in GitHub Desktop.
diff --git a/activesupport/lib/active_support/notifications.rb b/activesupport/lib/active_support/notifications.rb
index b32aa75..7a96c66 100644
--- a/activesupport/lib/active_support/notifications.rb
+++ b/activesupport/lib/active_support/notifications.rb
@@ -178,7 +178,7 @@ module ActiveSupport
end
def instrumenter
- InstrumentationRegistry.instrumenter_for(notifier)
+ InstrumentationRegistry.instance.instrumenter_for(notifier)
end
end
diff --git a/activesupport/lib/active_support/per_thread_registry.rb b/activesupport/lib/active_support/per_thread_registry.rb
index aa682fb..1cb9740 100644
--- a/activesupport/lib/active_support/per_thread_registry.rb
+++ b/activesupport/lib/active_support/per_thread_registry.rb
@@ -48,5 +48,6 @@ module ActiveSupport
def per_thread_registry_instance
Thread.current[name] ||= new
end
+ alias :instance :per_thread_registry_instance
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment