Browse files

Fix issue causing compressor to hang when reading from STDOUT and STD…

…ERR.

  * Reverting #e24acb30 since it needs to be implemented differently to avoid having the child process go to sleep
  * Bump version to 0.9.6
  • Loading branch information...
1 parent 4e7fa47 commit c53c6fdf326b906423a7e999c4b0ee520b9ad931 @jsl jsl committed Mar 29, 2011
Showing with 2 additions and 15 deletions.
  1. +1 −5 lib/yui/compressor.rb
  2. +0 −9 test/compressor_test.rb
  3. +1 −1 yui-compressor.gemspec
View
6 lib/yui/compressor.rb
@@ -3,9 +3,7 @@
module YUI #:nodoc:
class Compressor
- VERSION = "0.9.5"
-
- YUI_ERROR_MARKER = '[ERROR]'
+ VERSION = "0.9.6"
class Error < StandardError; end
class OptionError < Error; end
@@ -66,8 +64,6 @@ def compress(stream_or_string)
stdin.binmode
transfer(stream, stdin)
- raise if stderr.read.include?(YUI_ERROR_MARKER)
-
if block_given?
yield stdout
else
View
9 test/compressor_test.rb
@@ -33,8 +33,6 @@ class CompressorTest < Test::Unit::TestCase
}
})("hello");
END_JS
-
- FIXTURE_ERROR_JS = "var x = {class: 'name'};"
def test_compressor_should_raise_when_instantiated
assert_raises YUI::Compressor::Error do
@@ -103,12 +101,5 @@ def test_preserve_semicolons_option_should_preserve_semicolons
@compressor = YUI::JavaScriptCompressor.new(:preserve_semicolons => true)
assert_equal "var Foo={a:1};Foo.bar=(function(baz){if(false){doSomething();}else{for(var index=0;index<baz.length;index++){doSomething(baz[index]);}}})(\"hello\");", @compressor.compress(FIXTURE_JS)
end
-
- def test_compress_should_raise_on_javascript_syntax_error
- @compressor = YUI::JavaScriptCompressor.new
- assert_raise YUI::Compressor::RuntimeError do
- @compressor.compress(FIXTURE_ERROR_JS)
- end
- end
end
end
View
2 yui-compressor.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "yui-compressor"
- s.version = "0.9.5"
+ s.version = "0.9.6"
s.date = "2011-03-29"
s.summary = "JavaScript and CSS minification library"
s.email = "sstephenson@gmail.com"

0 comments on commit c53c6fd

Please sign in to comment.