Skip to content

Bug when sorting an enumerable that includes nil #13

Description

@perlun

This is what I get:

rake aborted!
TypeError: can't dup NilClass
/Library/Ruby/Gems/2.0.0/gems/semantic-1.4.1/lib/semantic/version.rb:52:in `dup'
/Library/Ruby/Gems/2.0.0/gems/semantic-1.4.1/lib/semantic/version.rb:52:in `<=>'
/Users/plundberg/git/mforms-addons-platform/Rakefile:25:in `sort'

Too lazy/busy to make a failing spec for it at the moment, but it should be trivial. IMHO, comparing "anything" to nil should always return 1, i.e. "anything" is higher than nil.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions