Skip to content

Commit d0411f2

Browse files
committed
Enable Windows support
This commit enables Windows platform support by adding Windows platforms to the `supported?` methods in `compile_cache` and in `load_path_cache`.
1 parent e8aad0c commit d0411f2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/bootsnap/compile_cache.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def self.permission_error(path)
3434
end
3535

3636
def self.supported?
37-
# only enable on 'ruby' (MRI), POSIX (darwin, linux, *bsd), and >= 2.3.0
37+
# only enable on 'ruby' (MRI), POSIX (darwin, linux, *bsd), Windows (RubyInstaller2) and >= 2.3.0
3838
RUBY_ENGINE == 'ruby' &&
39-
RUBY_PLATFORM =~ /darwin|linux|bsd/ &&
39+
RUBY_PLATFORM =~ /darwin|linux|bsd|mswin|mingw|cygwin/ &&
4040
Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.3.0")
4141
end
4242
end

lib/bootsnap/load_path_cache.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def setup(cache_path:, development_mode:, active_support: true)
6161

6262
def supported?
6363
RUBY_ENGINE == 'ruby' &&
64-
RUBY_PLATFORM =~ /darwin|linux|bsd/
64+
RUBY_PLATFORM =~ /darwin|linux|bsd|mswin|mingw|cygwin/
6565
end
6666
end
6767
end

0 commit comments

Comments
 (0)