CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/lib/rex/version.rb
Views: 11766
1
# rubocop:disable Lint/DeprecatedGemVersion
2
class Rex::Version < Gem::Version
3
4
def initialize(version)
5
if version.nil?
6
# Rubygems 4 is deprecating `nil` as a valid version number
7
# Currently it is the equivalent of a `0` so we set that here to keep the same functionality
8
version = 0
9
end
10
super version
11
end
12
end
13
# rubocop:enable Lint/DeprecatedGemVersion
14
15