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