Class: Rex::Version

Inherits:
Gem::Version
  • Object
show all
Defined in:
lib/rex/version.rb

Overview

rubocop:disable Lint/DeprecatedGemVersion

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ Version

Returns a new instance of Version.



4
5
6
7
8
9
10
11
# File 'lib/rex/version.rb', line 4

def initialize(version)
  if version.nil?
    # Rubygems 4 is deprecating `nil` as a valid version number
    # Currently it is the equivalent of a `0` so we set that here to keep the same functionality
    version = 0
  end
  super version
end