1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[bundler/bundler] build_metadata.rb - fix 'warning: instance variable @git_commit_sha not initialized'

37a1eec8c8
This commit is contained in:
MSP-Greg 2019-07-16 11:39:24 -05:00 committed by Hiroshi SHIBATA
parent 7b7caf9b55
commit 24062bd323
No known key found for this signature in database
GPG key ID: F9CF13417264FAC2

View file

@ -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.