lib/uglifier.rb in uglifier-2.0.0 vs lib/uglifier.rb in uglifier-2.0.1

- old
+ new

@@ -77,11 +77,11 @@ # Initialize new context for Uglifier with given options # # options - Hash of options to override Uglifier::DEFAULTS def initialize(options = {}) - (options.keys - DEFAULTS.keys - [:comments, :squeeze])[0..1].each do |missing| + (options.keys - DEFAULTS.keys - [:comments, :squeeze, :copyright])[0..1].each do |missing| raise ArgumentError.new("Invalid option: #{missing}") end @options = options @context = ExecJS.compile(File.open(ES5FallbackPath, "r:UTF-8").read + File.open(SourcePath, "r:UTF-8").read) end @@ -188,9 +188,11 @@ def comment_options val = if @options.has_key?(:output) && @options[:output].has_key?(:comments) @options[:output][:comments] elsif @options.has_key?(:comments) @options[:comments] + elsif @options[:copyright] == false + :none else DEFAULTS[:output][:comments] end case val