semantic icon indicating copy to clipboard operation
semantic copied to clipboard

Ruby Semantic Version class

Results 13 semantic issues
Sort by recently updated
recently updated
newest added

According to https://semver.org/#spec-item-8: > Patch and minor versions MUST be reset to 0 when major version is incremented. the README basically demonstrates this bug in this project.

At the moment, `Semantic::Version.new` raises a `NoMethodError` exception like this if you try to pass in `nil` as the version string: ``` undefined method `match' for nil:NilClass (NoMethodError) v =...

Comparison operators throw NoMethod error when comparing to nil. ``` [76] pry(main)> v = Semantic::Version.new('1.2.3') => # [77] pry(main)> v == nil NoMethodError: undefined method `major' for nil:NilClass from /home/tom/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/semantic-1.6.1/lib/semantic/version.rb:86:in...

[10] pry(main)> v = Semantic::Version.new('2.0.0-beta') => # [11] pry(main)> v.satisfies?('~> 1.0') => true It should return false for it, since it's no longer version 1

**Observed:** `Semantic::Version.new('1.2.3').satisfies?('')` throws an error with the message `undefined method strip for nil:NilClass` **Expected:** `false` or another error is returned

``` irb(main):002:0> Semantic::Version.new("1.2.3").satisfies?("foobar") Traceback (most recent call last): 3: from /Users/danielcooper/.rvm/rubies/ruby-2.5.1/bin/irb:11:in `' 2: from (irb):2 1: from /Users/danielcooper/.rvm/gems/ruby-2.5.1/gems/semantic-1.6.1/lib/semantic/version.rb:97:in `satisfies?' NoMethodError (undefined method `strip' for nil:NilClass) ``` I'd expect `.satisfies?` to...

This PR only updates the CI matrix to the latest generally available Ruby versions. Source for version numbers: https://github.com/rvm/rvm/blob/master/config/known

Your FOSSA integration was successful! Attached in this PR is a badge and license report to track scan status in your README. Below are docs for integrating FOSSA license checks...