summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile1
-rw-r--r--lib/coderay/scanner.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/Gemfile b/Gemfile
index 7620f3a..2479a20 100644
--- a/Gemfile
+++ b/Gemfile
@@ -9,6 +9,7 @@ group :development do
gem "bundler", "~> 1.0.0"
gem "rake", "~> 0.9.2"
gem "RedCloth"
+ gem "term-ansicolor"
gem "shoulda-context", "= 1.0.0.beta1" if RUBY_VERSION >= '1.8.7'
gem "json" unless RUBY_VERSION >= '1.9.1'
gem "rdoc" if RUBY_VERSION >= '1.8.7'
diff --git a/lib/coderay/scanner.rb b/lib/coderay/scanner.rb
index 27b6153..cce8633 100644
--- a/lib/coderay/scanner.rb
+++ b/lib/coderay/scanner.rb
@@ -100,7 +100,7 @@ module CodeRay
def encode_with_encoding code, target_encoding
if code.encoding == target_encoding
if code.valid_encoding?
- return to_unix code
+ return to_unix(code)
else
source_encoding = guess_encoding code
end