From 9e88a3925c85e26ae3e85e51f7d8157e45463fcb Mon Sep 17 00:00:00 2001 From: Ryan Tomayko Date: Sun, 22 May 2011 20:36:44 -0700 Subject: [PATCH] don't include FileTest in top-level, fixes #45 --- lib/rocco.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/rocco.rb b/lib/rocco.rb index 1c0aaed..b4f4508 100644 --- a/lib/rocco.rb +++ b/lib/rocco.rb @@ -52,8 +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. -include FileTest -if !ENV['PATH'].split(':').any? { |dir| executable?("#{dir}/pygmentize") } +if !ENV['PATH'].split(':').any? { |dir| File.executable?("#{dir}/pygmentize") } warn "WARNING: Pygments not found. Using webservice." end @@ -159,7 +158,7 @@ class Rocco # Returns `true` if `pygmentize` is available locally, `false` otherwise. def pygmentize? @_pygmentize ||= ENV['PATH'].split(':'). - any? { |dir| executable?("#{dir}/pygmentize") } + any? { |dir| File.executable?("#{dir}/pygmentize") } end # If `pygmentize` is available, we can use it to autodetect a file's