diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-03-28 17:01:16 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-03-28 17:01:16 -0500 |
commit | e2e8aa7d78b76cfb49404fa4226572df76fe0946 (patch) | |
tree | 71b38c501e1c73e5bb931e78d61d8756f933d19b | |
parent | 6ca09f574220a6bded14069f7163980551f54341 (diff) | |
download | bundler-seg-enotsup.tar.gz |
[SharedHelpers] Support 1.8.7 not having ENOTSUP definedseg-enotsup
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 | ||||
-rw-r--r-- | spec/bundler/shared_helpers_spec.rb | 2 |
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 |