passing a Hash to add_dependency should fail #323

cout opened this Issue May 4, 2012 · 1 comment

2 participants


I inadvertently wrote this (I think, from an example I found somewhere, though I don't recall where):

s.add_dependency 'foo' => '> 0.0.1'

but it breaks (500 internal server error) when I try to push the gem. The problem isn't immediately obvious; it should be:

s.add_dependency 'foo', '> 0.0.1'

It seems silly/extraneous to check in add_dependency to see if the caller passed in a Hash, but that is one way to make the call fail.

Probably a better check would be to see if the dependency's string contains any invalid or unusual characters such as '{' or '}', which would be the case for a Hash.

RubyGems member

Fixed by @cd8bcd2

@drbrain drbrain closed this Nov 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment