Compare version numbers properly

This commit is contained in:
Rob Newbould 2013-11-29 13:34:10 +00:00
parent 3210d166a7
commit 704fd7bdcc

View File

@ -95,7 +95,7 @@ CodeRay.scan("example", :ruby).term # just to load necessary files
$LOAD_PATH << File.dirname(File.realpath(__FILE__)) $LOAD_PATH << File.dirname(File.realpath(__FILE__))
# In CodeRay >= 1.1.0 token colors are defined as pre-escaped ANSI codes # In CodeRay >= 1.1.0 token colors are defined as pre-escaped ANSI codes
if CodeRay::VERSION >= "1.1.0" if Gem::Version.new(CodeRay::VERSION) >= Gem::Version.new('1.1.0')
require "escaped_colors" require "escaped_colors"
else else
require "unescaped_colors" require "unescaped_colors"