From c1a4dd756a6c3edcd069efeef1228cba32680ad2 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Tue, 30 Mar 2010 15:26:31 -0500 Subject: [PATCH] prefer .blank? to == '' --- lib/rocco.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rocco.rb b/lib/rocco.rb index 1b49f23..f3d96d0 100644 --- a/lib/rocco.rb +++ b/lib/rocco.rb @@ -52,7 +52,7 @@ require 'net/http' # Code is run through [Pygments](http://pygments.org/) for syntax # highlighting. If it's not installed, locally, use a webservice. -if `which pygmentize` == "" +if `which pygmentize`.blank? warn "WARNING: Pygments not found. Using webservice." end @@ -166,7 +166,7 @@ class Rocco # `pygmentize(1)` or code_stream = code_blocks.join("\n\n#{@options[:comment_chars]} DIVIDER\n\n") - if (`which pygmentize` == "") + if `which pygmentize`.blank? code_html = highlight_webservice(code_stream) else code_html = highlight_pygmentize(code_stream)