Skip to content

Commit

Permalink
Freeze filter arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Jun 30, 2016
1 parent b5edd86 commit 07c6c8c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nanoc/base/services/executor.rb
Expand Up @@ -21,6 +21,7 @@ def filter(rep, filter_name, filter_args = {})
# Run filter
last = rep.snapshot_contents[:last]
source = rep.binary? ? last.filename : last.string
filter_args.freeze
result = filter.setup_and_run(source, filter_args)
rep.snapshot_contents[:last] =
if filter.class.to_binary?
Expand Down Expand Up @@ -48,6 +49,7 @@ def layout(rep, layout_identifier, extra_filter_args = nil)
raise Nanoc::Int::Errors::Generic, "Cannot find rule for layout matching #{layout_identifier}"
end
filter_args = filter_args.merge(extra_filter_args || {})
filter_args.freeze

# Check whether item can be laid out
raise Nanoc::Int::Errors::CannotLayoutBinaryItem.new(rep) if rep.binary?
Expand Down

0 comments on commit 07c6c8c

Please sign in to comment.