mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rake/*.rb: Remove unused variable warnings.
Patch by Run Paint [ruby-core:30991] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ed4eaf7ce7
commit
ec67ee3387
2 changed files with 5 additions and 6 deletions
|
@ -1038,7 +1038,7 @@ module FileUtils
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ln(*args)
|
ln(*args)
|
||||||
rescue StandardError, NotImplementedError => ex
|
rescue StandardError, NotImplementedError
|
||||||
LN_SUPPORTED[0] = false
|
LN_SUPPORTED[0] = false
|
||||||
cp(*args)
|
cp(*args)
|
||||||
end
|
end
|
||||||
|
@ -1687,7 +1687,7 @@ module Rake
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_rule(*args, &block)
|
def create_rule(*args, &block)
|
||||||
pattern, arg_names, deps = resolve_args(args)
|
pattern, _, deps = resolve_args(args)
|
||||||
pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
|
pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
|
||||||
@rules << [pattern, deps, block]
|
@rules << [pattern, deps, block]
|
||||||
end
|
end
|
||||||
|
@ -1795,7 +1795,7 @@ module Rake
|
||||||
fail Rake::RuleRecursionOverflowError,
|
fail Rake::RuleRecursionOverflowError,
|
||||||
"Rule Recursion Too Deep" if level >= 16
|
"Rule Recursion Too Deep" if level >= 16
|
||||||
@rules.each do |pattern, extensions, block|
|
@rules.each do |pattern, extensions, block|
|
||||||
if md = pattern.match(task_name)
|
if pattern.match(task_name)
|
||||||
task = attempt_rule(task_name, extensions, block, level)
|
task = attempt_rule(task_name, extensions, block, level)
|
||||||
return task if task
|
return task if task
|
||||||
end
|
end
|
||||||
|
@ -2245,7 +2245,7 @@ module Rake
|
||||||
rescue LoadError => ex
|
rescue LoadError => ex
|
||||||
begin
|
begin
|
||||||
rake_require value
|
rake_require value
|
||||||
rescue LoadError => ex2
|
rescue LoadError
|
||||||
raise ex
|
raise ex
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,7 @@ module Rake # :nodoc:
|
||||||
|
|
||||||
def initialize(path, entry)
|
def initialize(path, entry)
|
||||||
@path = path
|
@path = path
|
||||||
@mode, line, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
|
@mode, _, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
|
||||||
@size = size.to_i
|
@size = size.to_i
|
||||||
@time = determine_time(d1, d2, d3)
|
@time = determine_time(d1, d2, d3)
|
||||||
end
|
end
|
||||||
|
@ -57,7 +57,6 @@ module Rake # :nodoc:
|
||||||
def determine_time(d1, d2, d3)
|
def determine_time(d1, d2, d3)
|
||||||
now = self.class.time.now
|
now = self.class.time.now
|
||||||
if /:/ =~ d3
|
if /:/ =~ d3
|
||||||
h, m = d3.split(':')
|
|
||||||
result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
|
result = Time.parse("#{d1} #{d2} #{now.year} #{d3}")
|
||||||
if result > now
|
if result > now
|
||||||
result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
|
result = Time.parse("#{d1} #{d2} #{now.year-1} #{d3}")
|
||||||
|
|
Loading…
Reference in a new issue