Check for Excon::VERSION constant in Ruby 1.9 should use inherit=false #147

Closed
bblimke opened this Issue Sep 11, 2012 · 1 comment

Comments

Projects
None yet
2 participants

bblimke commented Sep 11, 2012

The following line https://github.com/geemus/excon/blob/v0.14.3/lib/excon/constants.rb#L2 returns
true in Ruby 1.9 if there is a global ::VERSION constant defined.

This check should only look for VERSION constant defined in Excon module.

i.e using following method:

def is_constant_defined?(const)
  if ::RUBY_VERSION =~ /1.9/
    const_defined?(const, false)
  else
    const_defined?(const)
  end
end

bblimke commented Sep 11, 2012

This issue is a result of the following in WebMock: bblimke/webmock#202

@geemus geemus closed this in 20a93be Sep 13, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment