summaryrefslogtreecommitdiff
path: root/lib/bundler/constants.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/constants.rb')
-rw-r--r--lib/bundler/constants.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/bundler/constants.rb b/lib/bundler/constants.rb
index 2e4ebb37ee..9564771e78 100644
--- a/lib/bundler/constants.rb
+++ b/lib/bundler/constants.rb
@@ -1,7 +1,14 @@
# frozen_string_literal: true
+require "rbconfig"
+
module Bundler
WINDOWS = RbConfig::CONFIG["host_os"] =~ /(msdos|mswin|djgpp|mingw)/
- FREEBSD = RbConfig::CONFIG["host_os"] =~ /bsd/
- NULL = WINDOWS ? "NUL" : "/dev/null"
+ deprecate_constant :WINDOWS
+
+ FREEBSD = RbConfig::CONFIG["host_os"].to_s.include?("bsd")
+ deprecate_constant :FREEBSD
+
+ NULL = File::NULL
+ deprecate_constant :NULL
end