summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-03-28 17:01:16 -0500
committerSamuel Giddins <segiddins@segiddins.me>2016-03-28 17:01:16 -0500
commite2e8aa7d78b76cfb49404fa4226572df76fe0946 (patch)
tree71b38c501e1c73e5bb931e78d61d8756f933d19b
parent6ca09f574220a6bded14069f7163980551f54341 (diff)
downloadbundler-seg-enotsup.tar.gz
[SharedHelpers] Support 1.8.7 not having ENOTSUP definedseg-enotsup
-rw-r--r--lib/bundler/shared_helpers.rb2
-rw-r--r--spec/bundler/shared_helpers_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index 310eca35b0..e21d616ecd 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -109,7 +109,7 @@ module Bundler
raise TemporaryResourceError.new(path, action)
rescue Errno::EPROTO
raise VirtualProtocolError.new
- rescue Errno::ENOTSUP
+ rescue *[const_get_safely(:ENOTSUP, Errno)].compact
raise OperationNotSupportedError.new(path, action)
end
diff --git a/spec/bundler/shared_helpers_spec.rb b/spec/bundler/shared_helpers_spec.rb
index b22171a8c4..98f7994f9f 100644
--- a/spec/bundler/shared_helpers_spec.rb
+++ b/spec/bundler/shared_helpers_spec.rb
@@ -370,7 +370,7 @@ describe Bundler::SharedHelpers do
end
end
- context "system throws Errno::ENOTSUP" do
+ context "system throws Errno::ENOTSUP", :ruby => "1.9" do
let(:file_op_block) { proc {|_path| raise Errno::ENOTSUP } }
it "raises a OperationNotSupportedError" do