lib/uglifier.rb in uglifier-0.5.3 vs lib/uglifier.rb in uglifier-0.5.4

- old
+ new

@@ -21,18 +21,19 @@ :space_colon => 0 } } SourcePath = File.expand_path("../uglify.js", __FILE__) + ES5FallbackPath = File.expand_path("../es5.js", __FILE__) def self.compile(source, options = {}) self.new(options).compile(source) end # Create new instance of Uglifier with given options def initialize(options = {}) @options = DEFAULTS.merge(options) - @context = ExecJS.compile(File.read(SourcePath)) + @context = ExecJS.compile(File.read(ES5FallbackPath) + File.read(SourcePath)) end def compile(source) source = source.respond_to?(:read) ? source.read : source.to_s