This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Ruby 1.9 compatibility fix. With 1.9 Object.instance_methods returns …

…symbols instead of strings. Altered logic appropriately to support both.
  • Loading branch information...
bschwartz committed May 5, 2009
1 parent 8ce2d49 commit 7b90cea9bdf97c6f6173edfc0a43546df76d177d
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/hoptoad_notifier.rb
View
@@ -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

0 comments on commit 7b90cea

Please sign in to comment.