jnunemaker/httparty — pull request #350 by rusikf (2014-12-01 16:53:15+00:00)
Title: fix BasicObject

Why we must save BasicObject as a var in HTTParty module (?) :
```ruby
if defined?(::BasicObject)
BasicObject = ::BasicObject #:nodoc:
else
```
It is no needed to namespace under HTTParty.
There are no [class names collisions](https://github.com/jnunemaker/httparty/blob/master/History#L214) and tests are running successfully, if we use just
```
class Response < BasicObject
```
This code is not needed
```ruby
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
```
because BasicObject was added in ruby 1.9.0 to ruby-core. [Proof to ruby changelog](http://svn.ruby-lang.org/repos/ruby/tags/v1_9_0_0/ChangeLog), or use google/ruby-doc.org(see 1.9.3, 1.8.7 versions)
Hence, BasicObject is **always** defined on top of all classes in ruby version 1.9+
HTTParty supports only 1.9.3+ - [proof1](https://github.com/jnunemaker/httparty/blob/master/README.md#requirements), [proof2](https://github.com/jnunemaker/httparty/blob/master/History#L46)