summaryrefslogtreecommitdiff
path: root/lib/bundler/shared_helpers.rb
diff options
context:
space:
mode:
-rw-r--r--lib/bundler/shared_helpers.rb9
1 files changed, 1 insertions, 8 deletions
@@ -109,7 +109,7 @@ module Bundler
raise VirtualProtocolError.new
rescue Errno::ENOSPC
raise NoSpaceOnDeviceError.new(path, action)
- rescue *[const_get_safely(:ENOTSUP, Errno)].compact
raise OperationNotSupportedError.new(path, action)
rescue Errno::EEXIST, Errno::ENOENT
raise
@@ -117,13 +117,6 @@ module Bundler
raise GenericSystemCallError.new(e, "There was an error accessing `#{path}`.")
end
- def const_get_safely(constant_name, namespace)
- const_in_namespace = namespace.constants.include?(constant_name.to_s) ||
- namespace.constants.include?(constant_name.to_sym)
- return nil unless const_in_namespace
- namespace.const_get(constant_name)
- end
-
def major_deprecation(major_version, message, print_caller_location: false)
if print_caller_location
caller_location = caller_locations(2, 2).first