diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-09 06:15:04 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-09 06:15:04 -0700 |
| commit | 2241c39a203966ac4ea555013b7c4bce8ba22088 (patch) | |
| tree | cbf8506d66e1591f6f3c0adde88a65c1e3c425b2 /minirake | |
| parent | 2e3e5d9c29093ae0e32c0b7e7adc97588d7a76a4 (diff) | |
| parent | 9dd539bb157e40e78791d83a89f4727d4b10115d (diff) | |
| download | mruby-2241c39a203966ac4ea555013b7c4bce8ba22088.tar.gz mruby-2241c39a203966ac4ea555013b7c4bce8ba22088.zip | |
Merge pull request #1245 from NARKOZ/fix-warnings
remove unused variables
Diffstat (limited to 'minirake')
| -rwxr-xr-x | minirake | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -101,7 +101,7 @@ module MiniRake puts "Execute #{name}" if $trace self.class.enhance_with_matching_rule(name) if @actions.empty? unless $dryrun - @actions.each { |act| result = act.call(self) } + @actions.each { |act| act.call(self) } end end @@ -160,14 +160,14 @@ module MiniRake lookup(task_name).enhance([deps].flatten, &block) end - # Define a rule for synthesizing tasks. + # Define a rule for synthesizing tasks. def create_rule(args, &block) pattern, deps = resolve_args(args) pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern RULES << [pattern, deps, block] end - + # Lookup a task. Return an existing task if found, otherwise # create a task of the current type. def lookup(task_name) @@ -181,7 +181,7 @@ module MiniRake # the enhanced task or nil of no rule was found. def enhance_with_matching_rule(task_name) RULES.each do |pattern, extensions, block| - if md = pattern.match(task_name) + if pattern.match(task_name) ext = extensions.first deps = extensions[1..-1] case ext @@ -201,8 +201,8 @@ module MiniRake end nil end - - private + + private # Resolve the arguments for a task/rule. def resolve_args(args) @@ -256,7 +256,7 @@ module MiniRake # demand. def directory(dir) path = [] - Sys.split_all(dir).each do |p| + Sys.split_all(dir).each do |p| path << p FileTask.define_task(File.join(path)) do |t| Sys.makedirs(t.name) @@ -415,7 +415,7 @@ class RakeApp fail "Unknown option: #{opt}" end end - + # Read and handle the command line options. def handle_options $verbose = false |
