i
[chise/ruby.git] / chise / config.rb
index 1494d39..52663ee 100755 (executable)
@@ -5,16 +5,16 @@ require "singleton"
 module CHISE
   def windows?()
     rp = RUBY_PLATFORM
-    rp =~ /cygwin/ || rp =~ /mswin32/ || rp =~ /mingw32/
+    rp.index("cygwin") || rp.index("mswin32") || rp.index("mingw32")
   end
   module_function :windows?
 
   class Config
     include Singleton
+
     def initialize
       @base_dir = File.expand_path(File.dirname(__FILE__)+"/../..")
-#     @base_dir = "c:/chise"
-#     qp @base_dir
+      @csf_dir = @base_dir+"/csf"
 
       if CHISE.windows?()
        @db_dir  = @base_dir+"/char-db" # /sysmtem-char-id/ucs
@@ -24,7 +24,6 @@ module CHISE
        @ids_dir = "/home/eto/chise/ids"
       end
 
-      @csf_dir = @base_dir+"/csf"
       instance_variables.each {|name|
        self.class.class_eval { attr_reader name.delete("@") }
       }