Skip to content

Instantly share code, notes, and snippets.

@urbanautomaton
Last active December 10, 2015 20:08
Show Gist options
  • Save urbanautomaton/4485933 to your computer and use it in GitHub Desktop.
Save urbanautomaton/4485933 to your computer and use it in GitHub Desktop.
Method cache? What method cache?
class Object
alias_method :orig_extend, :extend
def extend(mod, *args)
puts "Extending #{self.class} with #{mod}"
orig_extend(mod, *args)
end
end
# This is the output, including the above monkeypatch, from a single
# request to the dashboard of our main app, after boot and a few
# warm-up requests.
Extending ActiveRecord::Relation with #<Module:0x00000104cc5498>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000104be10e0>
Extending ActiveRecord::Relation with #<Module:0x00000104bb50d0>
Extending ActiveRecord::Relation with #<Module:0x00000104b95de8>
Extending ActiveRecord::Relation with #<Module:0x00000104b82e50>
Extending ActiveRecord::Relation with #<Module:0x00000104b61750>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000104941f38>
Extending ActiveRecord::Relation with #<Module:0x00000104922610>
Extending ActiveRecord::Relation with #<Module:0x00000104902a18>
Extending ActiveRecord::Relation with #<Module:0x000001048e64a8>
Extending ActiveRecord::Relation with #<Module:0x000001048c33e0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001012c98e8>
Extending ActiveRecord::Relation with #<Module:0x0000010129c3e8>
Extending ActiveRecord::Relation with #<Module:0x0000010127b030>
Extending ActiveRecord::Relation with #<Module:0x0000010124cc08>
Extending ActiveRecord::Relation with #<Module:0x00000101228e98>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001030f1848>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000107a860d0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000107823b08>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001074b6b00>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001071501a0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106dded50>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106acb398>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001067b7e18>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001064e1630>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106256820>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000105f74968>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000105c808d8>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001057886c8>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x0000010540d4f8>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000104fe1b18>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000104b203b8>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000101308228>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000103041268>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000107a66168>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001077e0768>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000107433250>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x000001070742e0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106d5a780>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106a2ae20>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106710a00>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106440348>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000106181fd0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000105e83db0>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000105b33098>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000105648510>
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001067c2b60> with Haml::Helpers
Extending #<Class:0x00000106550170> with Haml::Helpers
Extending #<Class:0x00000106183358> with Haml::Helpers
Extending #<Class:0x00000105e71c50> with Haml::Helpers
Extending #<Class:0x00000105ae7828> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending ActiveRecord::Relation with #<Module:0x00000100dd06c0>
Extending ActiveRecord::Relation with #<Module:0x00000100dd06c0>
Extending ActiveRecord::Relation with #<Module:0x00000100dd06c0>
Extending #<Class:0x00000100e04bc8> with Haml::Helpers
Extending User::FriendlyIdActiveRecordRelation with #<Module:0x000001079002b0>
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x00000106f288c8> with Haml::Helpers
Extending Hash with RSolr::Client::Context
Extending Hash with RSolr::Response
Extending Array with RSolr::Response::PaginatedDocSet
Extending ActiveRecord::Relation with #<Module:0x00000107140db8>
Extending ActiveRecord::Relation with #<Module:0x000001071174e0>
Extending ActiveRecord::Relation with #<Module:0x000001070c0870>
Extending ActiveRecord::Relation with #<Module:0x00000107085248>
Extending ActiveRecord::Relation with #<Module:0x00000107057a28>
Extending ActiveRecord::Relation with #<Module:0x00000107041f48>
Extending #<Class:0x000001061d2bd8> with Haml::Helpers
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Paperclip::Attachment with Paperclip::Storage::S3
Extending Hash with RSolr::Client::Context
Extending Hash with RSolr::Response
Extending Array with RSolr::Response::PaginatedDocSet
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Extending #<Class:0x000001060b6178> with Haml::Helpers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment