Permalink
Browse files

options.respond_to? doesn't work as expected

  • Loading branch information...
1 parent a9281e4 commit 8bea93e2bbc7556ef382a6eb83918e457466102b @toolmantim committed Oct 8, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/sinatra/toadhopper.rb
@@ -6,7 +6,7 @@ module Sinatra
module Toadhopper
# Reports the current sinatra error to Hoptoad
def post_error_to_hoptoad!
- options.toadhopper.each_pair {|k, v| ::Toadhopper.__send__("#{k}=", v)} if options.respond_to?(:toadhopper)
+ options.toadhopper.each_pair {|k, v| ::Toadhopper.__send__("#{k}=", v)}
unless ::Toadhopper.api_key
STDERR.puts "WARNING: Ignoring hoptoad notification - :api_key not set"
return

0 comments on commit 8bea93e

Please sign in to comment.