From 24062bd323ec9c5311bbf2c5f8f2822f15a38c62 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Tue, 16 Jul 2019 11:39:24 -0500 Subject: [PATCH] [bundler/bundler] build_metadata.rb - fix 'warning: instance variable @git_commit_sha not initialized' https://github.com/bundler/bundler/commit/37a1eec8c8 --- lib/bundler/build_metadata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.