Skip to content

Commit

Permalink
Merge pull request #765 from fluent/fix-regression-of-unused-paramete…
Browse files Browse the repository at this point in the history
…r-warning

Fix the regression of unused parameter warning inside sub section
  • Loading branch information
repeatedly committed Jan 25, 2016
1 parent b835c07 commit 2e94560
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/fluent/config/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ def each_element(*names, &block)
end

def has_key?(key)
@unused_in = false # some sections, e.g. <store> in copy, is not defined by config_section so clear unused flag for better warning message in chgeck_not_fetched.
@unused.delete(key)
super
end

def [](key)
@unused_in = false # ditto
@unused.delete(key)
super
end
Expand Down

0 comments on commit 2e94560

Please sign in to comment.