From 9d814a4eb7b59ce617569b40a19c3c183fecda33 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 17 Mar 2013 23:35:46 +0100 Subject: [PATCH] Add method String#force_encoding to 1.8.7 --- lib/jekyll/core_ext.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/jekyll/core_ext.rb b/lib/jekyll/core_ext.rb index 1d6b83a1..b1192cf4 100644 --- a/lib/jekyll/core_ext.rb +++ b/lib/jekyll/core_ext.rb @@ -58,3 +58,11 @@ module Enumerable any? { |exp| File.fnmatch?(exp, e) } end end + +if RUBY_VERSION < "1.9" + class String + def force_encoding(enc) + self + end + end +end