From e2e8aa7d78b76cfb49404fa4226572df76fe0946 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Mon, 28 Mar 2016 17:01:16 -0500 Subject: [SharedHelpers] Support 1.8.7 not having ENOTSUP defined --- lib/bundler/shared_helpers.rb | 2 +- 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 -- cgit v1.2.1