Commit 5e75d377 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Use Ruby methods, not Rails' String#first

Gitaly-Ruby is not a Rails application, which made the method not exist
after the vendor. This patch uses direct indexing, which has the same
properties that `#first` has.

Found while working on: https://gitlab.com/gitlab-org/gitaly/merge_requests/699
parent 87f1736a
...@@ -38,7 +38,9 @@ module Gitlab ...@@ -38,7 +38,9 @@ module Gitlab
end end
def extract_operation def extract_operation
case @raw_operation&.first(1) return :unknown unless @raw_operation
case @raw_operation[0]
when 'A' when 'A'
:added :added
when 'C' when 'C'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment