From ace0450774daa258936efcaa6f0b18ba02a4a439 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Sat, 6 Mar 2010 16:27:12 -0800 Subject: [PATCH] Fix a bug in 1.8.6 where readbyte is not defined. --- lib/compass/sass_extensions/functions/image_size.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/compass/sass_extensions/functions/image_size.rb b/lib/compass/sass_extensions/functions/image_size.rb index 02a07539..c143faa8 100644 --- a/lib/compass/sass_extensions/functions/image_size.rb +++ b/lib/compass/sass_extensions/functions/image_size.rb @@ -69,6 +69,11 @@ private private def examine(io) class << io + unless method_defined?(:readbyte) + def readbyte + getc + end + end def readint; (readbyte << 8) + readbyte; end def readframe; read(readint - 2); end def readsof; [readint, readbyte, readint, readint, readbyte]; end