Prefer %w syntax
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/a1ca51e9 Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/a1ca51e9 Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/a1ca51e9 Branch: refs/heads/master Commit: a1ca51e9d1653fff8c9928741454a7e1d126c06d Parents: b3c4f82 Author: Peter Donald <[email protected]> Authored: Sun May 22 20:25:42 2016 +1000 Committer: Peter Donald <[email protected]> Committed: Sun May 22 20:25:42 2016 +1000 ---------------------------------------------------------------------- lib/buildr/java/pom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/buildr/blob/a1ca51e9/lib/buildr/java/pom.rb ---------------------------------------------------------------------- diff --git a/lib/buildr/java/pom.rb b/lib/buildr/java/pom.rb index a7ec7a0..e91c232 100644 --- a/lib/buildr/java/pom.rb +++ b/lib/buildr/java/pom.rb @@ -124,7 +124,7 @@ module Buildr # properties for groupId, artifactId, version and packaging. def properties() @properties ||= begin - pom = ["groupId", "artifactId", "version", "packaging"].inject({}) { |hash, key| + pom = %w(groupId artifactId version packaging).inject({}) { |hash, key| value = project[key] || (parent ? parent.project[key] : nil) hash[key] = hash["pom.#{key}"] = hash["project.#{key}"] = value_of(value) if value hash
