Skip to content

Commit

Permalink
Simple fix for bot lookup crashes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason King committed Mar 6, 2011
1 parent 67da821 commit 6c995fa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/lookup.rb
Expand Up @@ -139,9 +139,8 @@ def search(msg, options={})
api_check = lambda { |options| (!apis.keys.map(&:to_s).include?(options[:api]) && !options[:api].is_a?(Api)) }
# to_s because yaml interprets "1.8" as a literal 1.8
# And because I'm super, super lazy
if !@attempted_ruby && api_check.call(options)
if api_check.call(options)
# Attempt a current Ruby lookup
@attempted_ruby = true
api = case RUBY_VERSION
when /^1.8/
"1.8"
Expand Down

0 comments on commit 6c995fa

Please sign in to comment.