Ruby 2.0 switches to using #inspect instead of #to_s when printing out objects, which brings back the infinite-hang-on-NoMethodError bug from http://bugs.ruby-lang.org/issues/4521. Aliasing #inspect to #to_s for Middleman::Application fixes it again. This fixes #833.

This commit is contained in:
Ben Hollis 2013-04-02 22:19:17 -07:00
parent 7c1c93562a
commit cc418c7a2d

View file

@ -185,6 +185,7 @@ module Middleman
def to_s def to_s
"#<Middleman::Application:0x#{object_id}>" "#<Middleman::Application:0x#{object_id}>"
end end
alias :inspect :to_s # Ruby 2.0 calls inspect for NoMethodError instead of to_s
# Expand a path to include the index file if it's a directory # Expand a path to include the index file if it's a directory
# #