diff options
author | Bundlerbot <bot@bundler.io> | 2019-07-22 13:50:47 +0000 |
---|---|---|
committer | Bundlerbot <bot@bundler.io> | 2019-07-22 13:50:47 +0000 |
commit | a9beb66ed23d9ea5bb1b07256400b503fad80a62 (patch) | |
tree | b1288f4eab9cf108692b43f22ddcc07e85029de6 | |
parent | 0305b1731a52ee91551ac0097fae5a2ca24da155 (diff) | |
parent | 37a1eec8c84ea0a446201cd268bab8d93bc429e1 (diff) | |
download | bundler-a9beb66ed23d9ea5bb1b07256400b503fad80a62.tar.gz |
Merge #7250
7250: Fix ruby core dsl spec.rb failure, warning on build_metadata.rb r=deivid-rodriguez a=MSP-Greg
### What was the end-user problem that led to this PR?
Travis CI job on Ruby master was failing & had a nuisance warning.
### What is your fix for the problem, implemented in this PR?
1. dls_spec.rb - Minor change to the error msg regexp match string
2. build_metadata.rb - change `if @git_commit_sha` to `if instance_variable_defined? :@git_commit_sha`
Co-authored-by: MSP-Greg <msp-greg@users.noreply.github.com>
-rw-r--r-- | lib/bundler/build_metadata.rb | 2 | ||||
-rw-r--r-- | spec/bundler/dsl_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/bundler/build_metadata.rb b/lib/bundler/build_metadata.rb index 33f91e9162..4dfad2f8d8 100644 --- a/lib/bundler/build_metadata.rb +++ b/lib/bundler/build_metadata.rb @@ -23,7 +23,7 @@ module Bundler # The SHA for the git commit the bundler gem was built from. def self.git_commit_sha - return @git_commit_sha if @git_commit_sha + return @git_commit_sha if instance_variable_defined? :@git_commit_sha # If Bundler has been installed without its .git directory and without a # commit instance variable then we can't determine its commits SHA. diff --git a/spec/bundler/dsl_spec.rb b/spec/bundler/dsl_spec.rb index 69e4107408..2102086794 100644 --- a/spec/bundler/dsl_spec.rb +++ b/spec/bundler/dsl_spec.rb @@ -271,7 +271,7 @@ RSpec.describe Bundler::Dsl do it "will raise a Bundler::GemfileError" do gemfile "gem 'foo', :path => /unquoted/string/syntax/error" expect { Bundler::Dsl.evaluate(bundled_app("Gemfile"), nil, true) }. - to raise_error(Bundler::GemfileError, /There was an error parsing `Gemfile`:( compile error -)? unknown regexp options - trg. Bundler cannot continue./) + to raise_error(Bundler::GemfileError, /There was an error parsing `Gemfile`:( compile error -)? unknown regexp options - trg.+ Bundler cannot continue./) end end |