Skip to content
Browse files

updated mutli_json and fixes some of warnings

  • Loading branch information...
1 parent 0e1b5d1 commit eb86046d636e45917333965ac5bfaadf92528c6a @arunagw committed Apr 18, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/uglifier.rb
  2. +1 −1 uglifier.gemspec
View
8 lib/uglifier.rb
@@ -61,7 +61,7 @@ def compile(source)
js = []
js << "var result = '';"
- js << "var source = #{MultiJson.encode(source)};"
+ js << "var source = #{MultiJson.dump(source)};"
js << "var ast = UglifyJS.parser.parse(source);"
if @options[:lift_vars]
@@ -79,18 +79,18 @@ def compile(source)
end
if @options[:mangle]
- js << "ast = UglifyJS.uglify.ast_mangle(ast, #{MultiJson.encode(mangle_options)});"
+ js << "ast = UglifyJS.uglify.ast_mangle(ast, #{MultiJson.dump(mangle_options)});"
end
if @options[:squeeze]
- js << "ast = UglifyJS.uglify.ast_squeeze(ast, #{MultiJson.encode(squeeze_options)});"
+ js << "ast = UglifyJS.uglify.ast_squeeze(ast, #{MultiJson.dump(squeeze_options)});"
end
if @options[:unsafe]
js << "ast = UglifyJS.uglify.ast_squeeze_more(ast);"
end
- js << "result += UglifyJS.uglify.gen_code(ast, #{MultiJson.encode(gen_code_options)});"
+ js << "result += UglifyJS.uglify.gen_code(ast, #{MultiJson.dump(gen_code_options)});"
if !@options[:beautify] && @options[:max_line_length]
js << "result = UglifyJS.uglify.split_lines(result, #{@options[:max_line_length].to_i})"
View
2 uglifier.gemspec
@@ -50,7 +50,7 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rdoc>, ["~> 3.11"])
else
s.add_dependency(%q<execjs>, [">= 0.3.0"])
- s.add_dependency(%q<multi_json>, [">= 1.0.2"])
+ s.add_dependency(%q<multi_json>, [">= 1.3"])
s.add_dependency(%q<rspec>, ["~> 2.7"])
s.add_dependency(%q<bundler>, ["~> 1.0"])
s.add_dependency(%q<jeweler>, ["~> 1.8.3"])

0 comments on commit eb86046

Please sign in to comment.
Something went wrong with that request. Please try again.