diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-11-03 13:09:18 +0100 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2016-02-05 08:39:44 +0100 |
commit | 5ffec2c953478fbad35d7e7f4fc4b6eb119d7918 (patch) | |
tree | 055f748ad97954ffce6c195139b8248ba1471c7b | |
parent | be3399868cbcfdce85daa6fdf53a079bc163056a (diff) | |
download | gitlab-ce-5ffec2c953478fbad35d7e7f4fc4b6eb119d7918.tar.gz |
Freeze the expression instead of the literal
Also remove the spec for it
-rw-r--r-- | lib/gitlab/git.rb | 3 | ||||
-rw-r--r-- | spec/lib/gitlab/git_spec.rb | 9 |
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/gitlab/git.rb b/lib/gitlab/git.rb index a33daeb119f..191bea86ac3 100644 --- a/lib/gitlab/git.rb +++ b/lib/gitlab/git.rb @@ -1,7 +1,6 @@ module Gitlab module Git - # '0' * 40 -- this was easyer to freeze - BLANK_SHA = "0000000000000000000000000000000000000000".freeze + BLANK_SHA = ('0' * 40).freeze TAG_REF_PREFIX = "refs/tags/".freeze BRANCH_REF_PREFIX = "refs/heads/".freeze diff --git a/spec/lib/gitlab/git_spec.rb b/spec/lib/gitlab/git_spec.rb deleted file mode 100644 index 3b4052fa549..00000000000 --- a/spec/lib/gitlab/git_spec.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'spec_helper' - -describe Gitlab::Git do - describe "BLANK_SHA" do - it "is a string of 40 zero's" do - expect(Gitlab::Git::BLANK_SHA).to eq('0' * 40) - end - end -end |