defunkt/mustache — pull request #147 by mdavidn (2013-01-26 01:46:47+00:00)
Title: Fix Mustache#const_get! behavior

By default, each call to `Module#const_get` will fall back on constants in `Object`.

````ruby
require 'mustache' # v0.99.4
Mustache.const_get!('Mustache::Mustache::Mustache::Mustache')
# => Mustache
````

Thanks to an API change in 1.9, the incantations to avoid this behavior changed in Ruby 1.9. My fix is based on Rails 3.2.1's implementation of [`String.constantize`](https://github.com/rails/rails/blob/v3.2.1/activesupport/lib/active_support/inflector/methods.rb#L192-L233).

This was an issue in my project because we have a Mustache view which shares a name with a top-level module. `Mustache#view_class`, thinking it found a view, would never attempt to load my view's implementation.