mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
fix BasicObject
This commit is contained in:
parent
7272eae66e
commit
9a27bf96ed
2 changed files with 1 additions and 9 deletions
|
@ -1,12 +1,4 @@
|
|||
module HTTParty
|
||||
if defined?(::BasicObject)
|
||||
BasicObject = ::BasicObject #:nodoc:
|
||||
else
|
||||
class BasicObject #:nodoc:
|
||||
instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval/ }
|
||||
end
|
||||
end
|
||||
|
||||
unless defined?(Net::HTTP::Patch)
|
||||
class Net::HTTP
|
||||
def patch(path, data, initheader = nil, dest = nil, &block) #:nodoc:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module HTTParty
|
||||
class Response < HTTParty::BasicObject #:nodoc:
|
||||
class Response < BasicObject
|
||||
def self.underscore(string)
|
||||
string.gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').gsub(/([a-z])([A-Z])/,'\1_\2').downcase
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue