From 3fb43d5aeee0667eea110562618246fbef98cc8b Mon Sep 17 00:00:00 2001 From: speedmax Date: Sat, 4 Jul 2009 02:53:05 +1000 Subject: [PATCH] Adding conditional hack to be compatible with Ruby 1.8/1.9 --- lib/rchardet/universaldetector.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rchardet/universaldetector.rb b/lib/rchardet/universaldetector.rb index e540a48..4ea9d7e 100755 --- a/lib/rchardet/universaldetector.rb +++ b/lib/rchardet/universaldetector.rb @@ -60,7 +60,7 @@ def reset def feed(aBuf) # HACK: force internal encoding to be ascii-8bit (ruby 1.8 bytes) - aBuf = aBuf.force_encoding('ASCII-8BIT') + aBuf = aBuf.force_encoding('ASCII-8BIT') if aBuf.respond_to?(:force_encoding) return if @done aLen = aBuf.length