Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
Ruby 1.9 compatibility fix. With 1.9 Object.instance_methods returns …
Browse files Browse the repository at this point in the history
…symbols instead of strings. Altered logic appropriately to support both.
  • Loading branch information
bschwartz committed May 5, 2009
1 parent 8ce2d49 commit 7b90cea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hoptoad_notifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def add_default_filters
module Catcher

def self.included(base) #:nodoc:
if base.instance_methods.include? 'rescue_action_in_public' and !base.instance_methods.include? 'rescue_action_in_public_without_hoptoad'
if base.instance_methods.map(&:to_s).include? 'rescue_action_in_public' and !base.instance_methods.map(&:to_s).include? 'rescue_action_in_public_without_hoptoad'
base.send(:alias_method, :rescue_action_in_public_without_hoptoad, :rescue_action_in_public)
base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_hoptoad)
end
Expand Down

0 comments on commit 7b90cea

Please sign in to comment.