intercom/intercom-ruby — pull request #82 by javiercr (2014-06-26 15:33:40+00:00)
Title: Disable inheritance for constants lookup

[const_defined?](http://www.ruby-doc.org/core-2.0.0/Module.html#method-i-const_defined-3F) has an option to enable/disable looking up for constants in ancestors:

*Checks for a constant with the given name in mod If inherit is set, the lookup will also search the ancestors (and Object if mod is a Module.)*

If we leave that option to true, `Intercom.const_defined?` will return true for constants defined in the global namespace, such as an Admin class created for Single Table Inheritance in a typical Rails app. That will cause problems like #80 (this PR solves that problem)