requirements/java_requirement: fix Rubocop warnings.
This commit is contained in:
parent
7e42c5d080
commit
fb0e121686
@ -9,7 +9,7 @@ class JavaRequirement < Requirement
|
||||
next false unless File.executable? "/usr/libexec/java_home"
|
||||
|
||||
args = %w[--failfast]
|
||||
args << "--version" << "#{@version}" if @version
|
||||
args << "--version" << @version.to_s if @version
|
||||
@java_home = Utils.popen_read("/usr/libexec/java_home", *args).chomp
|
||||
$?.success?
|
||||
end
|
||||
@ -27,7 +27,7 @@ class JavaRequirement < Requirement
|
||||
end
|
||||
|
||||
def initialize(tags)
|
||||
@version = tags.shift if /(\d\.)+\d/ === tags.first
|
||||
@version = tags.shift if /(\d\.)+\d/ =~ tags.first
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user