From 4be65afb9be72a74867a4702df4a3e062505ed63 Mon Sep 17 00:00:00 2001 From: MrHayato Date: Tue, 19 Mar 2013 15:58:53 -0700 Subject: [PATCH] Escape paths to compiler. The fix put in for #18 by 8be481b005 was lost, and whitespaces were an issue again in 1.1.8. --- lib/closure/compiler.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/closure/compiler.rb b/lib/closure/compiler.rb index a891cba..478f392 100644 --- a/lib/closure/compiler.rb +++ b/lib/closure/compiler.rb @@ -55,6 +55,11 @@ def compile(io) # resulting JavaScript as a string or yields an IO object containing the # response to a block, for streaming. def compile_files(files) + if (files.is_a?(Array)) + files = files.map { |file| '"' + file + '"' } + else + files = '"' + files + '"' + end @options.merge!(:js => files) begin