Permalink
Browse files

兼容REE

  • Loading branch information...
1 parent 87edcc3 commit af123ab71b2fa0a3955324884a95f642034339c7 wangxz committed Jun 21, 2012
Showing with 6 additions and 2 deletions.
  1. +5 −1 lib/oauth_china/multipart.rb
  2. +1 −1 lib/oauth_china/version.rb
@@ -12,7 +12,11 @@ def initialize(k, v)
def to_multipart
#return "Content-Disposition: form-data; name=\"#{CGI::escape(k)}\"\r\n\r\n#{v}\r\n"
# Don't escape mine...
- return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n".force_encoding("ASCII-8BIT")
+ if "".respond_to?(:force_encoding)
+ return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n".force_encoding("ASCII-8BIT")
+ else
+ return "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n"
+ end
end
end
@@ -1,3 +1,3 @@
module OauthChina
- VERSION = "0.4.0"
+ VERSION = "0.5.0"
end

0 comments on commit af123ab

Please sign in to comment.