[Groonga-commit] groonga/groonga at 144f201 [master] mrb: follow mruby-io's Windows support

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jan 5 10:40:00 JST 2016


Kouhei Sutou	2016-01-05 10:40:00 +0900 (Tue, 05 Jan 2016)

  New Revision: 144f2017c71325b07d42b69895090bf2a63132e0
  https://github.com/groonga/groonga/commit/144f2017c71325b07d42b69895090bf2a63132e0

  Message:
    mrb: follow mruby-io's Windows support

  Modified files:
    lib/mrb/scripts/require.rb

  Modified: lib/mrb/scripts/require.rb (+4 -1)
===================================================================
--- lib/mrb/scripts/require.rb    2016-01-05 09:19:54 +0900 (4f13399)
+++ lib/mrb/scripts/require.rb    2016-01-05 10:40:00 +0900 (1352b32)
@@ -19,6 +19,9 @@ class ScriptLoader
       $LOAD_PATH.each do |load_path|
         unless absolute_path?(load_path)
           load_path = File.expand_path(load_path)
+          if File::ALT_SEPARATOR
+            load_path = load_path.gsub(File::ALT_SEPARATOR, "/")
+          end
         end
         loaded = load_once_path(File.join(load_path, @base_path))
         return loaded unless loaded.nil?
@@ -33,7 +36,7 @@ class ScriptLoader
   end
 
   def absolute_path?(path)
-    path.start_with?("/")
+    path.start_with?("/") or (/\A[a-z]:\\/i === path)
   end
 
   def load_once_path(path)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index