diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-05-02 19:15:25 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-05-26 14:58:01 +0300 |
commit | 309ca405fa30e1eeaeaeddc0c8918e65c98ebbf7 (patch) | |
tree | 914eedab813d679087ba1c008f91b98577bcb42a /app/models | |
parent | f2caad2467f318ec1359ee9b03509e831cde9d16 (diff) |
Don't modify arguments in CommitRange#initialize
This method used to call strip! on input strings which will mess with
the strings if they're re-used or frozen.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/commit_range.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/commit_range.rb b/app/models/commit_range.rb index 51673897d98..4066958f67c 100644 --- a/app/models/commit_range.rb +++ b/app/models/commit_range.rb @@ -62,7 +62,7 @@ class CommitRange def initialize(range_string, project) @project = project - range_string.strip! + range_string = range_string.strip unless range_string =~ /\A#{PATTERN}\z/ raise ArgumentError, "invalid CommitRange string format: #{range_string}" |