summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2015-12-29 11:40:57 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-01-14 12:48:14 +0100
commitc177784d5af6b47ae613f922e075a38fc56ad711 (patch)
treeefcf39ca5824ff1adf6ff094e7fd0d64b7e5d120
parentc33b105f11ce2b9232de8c7d07f810c29edd3f5b (diff)
downloadgitlab-ce-c177784d5af6b47ae613f922e075a38fc56ad711.tar.gz
Use short method call in StringPath instead block
-rw-r--r--lib/gitlab/string_path.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/string_path.rb b/lib/gitlab/string_path.rb
index 1eb8162f805..af80a502bf6 100644
--- a/lib/gitlab/string_path.rb
+++ b/lib/gitlab/string_path.rb
@@ -72,7 +72,7 @@ module Gitlab
def directories
return [] unless directory?
- children.select { |child| child.directory? }
+ children.select(&:directory?)
end
def directories!
@@ -81,7 +81,7 @@ module Gitlab
def files
return [] unless directory?
- children.select { |child| child.file? }
+ children.select(&:file?)
end
def ==(other)