Method: Middleman::SourceWatcher#to_s

Defined in:
lib/middleman-core/sources/source_watcher.rb

#to_sObject Also known as: inspect

Work around this bug: http://bugs.ruby-lang.org/issues/4521 where Ruby will call to_s/inspect while printing exception messages, which can take a long time (minutes at full CPU) if the object is huge or has cyclic references, like this.



226
227
228
# File 'lib/middleman-core/sources/source_watcher.rb', line 226

def to_s
  "#<Middleman::SourceWatcher:0x#{object_id} type=#{@type.inspect} directory=#{@directory.inspect}>"
end