lib/quebert/support.rb in quebert-0.0.4 vs lib/quebert/support.rb in quebert-0.0.6

- old
+ new

@@ -4,12 +4,12 @@ autoload :PidFile, 'quebert/support/pid_file' autoload :Registry, 'quebert/support/registry' # Borrowed from Rails ActiveSupport def self.constantize(camel_cased_word) #:nodoc: - names = camel_cased_word.split('::') + names = camel_cased_word.to_s.split('::') names.shift if names.empty? || names.first.empty? - + constant = Object names.each do |name| constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name) end constant \ No newline at end of file