Skip to content

Commit

Permalink
Ruby 1.8 #instance_methods returns a list of strings, where as 1.9 is…
Browse files Browse the repository at this point in the history
… symbols. Moved the conditional into class for symmetry with the above Hash#deep_merge
  • Loading branch information
TJ Singleton authored and stffn committed May 20, 2010
1 parent 5fc78f8 commit 35ec81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/declarative_authorization/rails_legacy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def deep_merge(other_hash)
end
end

unless String.instance_methods.include?('html_safe')
class String
class String
unless "".respond_to?(:html_safe)
def html_safe
self
end
Expand Down

0 comments on commit 35ec81b

Please sign in to comment.