lib/adhearsion/initializer.rb in adhearsion-1.0.2 vs lib/adhearsion/initializer.rb in adhearsion-1.0.3

- old
+ new

@@ -89,10 +89,10 @@ location = File.join location, ".ahnrc" if File.directory? location File.exists?(location) ? YAML.load_file(location) : nil end def ahn_root=(path) - if Object.constants.include?("AHN_ROOT") + if Object.constants.map(&:to_sym).include?(:AHN_ROOT) Object.const_get(:AHN_ROOT).base_path = File.expand_path(path) else Object.const_set(:AHN_ROOT, PathString.new(File.expand_path(path))) end end