mirror of
https://github.com/jnunemaker/httparty
synced 2023-03-27 23:23:07 -04:00
Switched from BlankSlate to BasicObject and only defining it if it doesn't exist for ruby 1.9 compat.
Closes gh-20
This commit is contained in:
parent
f2fa3ce13b
commit
4eb14a17ba
2 changed files with 4 additions and 8 deletions
|
@ -1,10 +1,6 @@
|
|||
if RUBY_VERSION.to_f == 1.8
|
||||
class BlankSlate #:nodoc:
|
||||
instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval|object_id/ }
|
||||
end
|
||||
else
|
||||
class BlankSlate < BasicObject; end
|
||||
end
|
||||
class BasicObject #:nodoc:
|
||||
instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval/ }
|
||||
end unless defined?(BasicObject)
|
||||
|
||||
# 1.8.6 has mistyping of transitive in if statement
|
||||
require "rexml/document"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module HTTParty
|
||||
class Response < BlankSlate #:nodoc:
|
||||
class Response < BasicObject #:nodoc:
|
||||
attr_accessor :body, :code, :message, :headers
|
||||
attr_reader :delegate
|
||||
|
||||
|
|
Loading…
Reference in a new issue