oauth-xx/oauth-ruby — pull request #88 by clifff (2014-05-07 16:48:48+00:00)
Title: Rails 3+ / ActiveSupport::SafeBuffer patch

Previously, if an Oauth code path was executed in a Rails controller, it would result in these `to_s` methods to return an ActiveSupport::SafeBuffer object, rather than String - which causes problems in the URI library and ends up raising an error.

This change should be also be compatible with non-Rails environments as well:

irb(main):001:0> ActiveSupport::SafeBuffer.new("foo").to_s.to_str.class
=> String
irb(main):002:0> String.new("bar").to_s.to_str.class
=> String
irb(main):003:0> nil.to_s.to_str.class
=> String