Class: SyntaxTree::Formatter::SemanticVersion
- Inherits:
-
Gem::Version
- Object
- Gem::Version
- SyntaxTree::Formatter::SemanticVersion
- Defined in:
- lib/syntax_tree/formatter.rb
Overview
Unfortunately, Gem::Version.new is not ractor-safe because it performs global caching using a class variable. This works around that by just setting the instance variables directly.
Instance Method Summary collapse
-
#initialize(version) ⇒ SemanticVersion
constructor
A new instance of SemanticVersion.
Constructor Details
#initialize(version) ⇒ SemanticVersion
Returns a new instance of SemanticVersion.
11 12 13 14 |
# File 'lib/syntax_tree/formatter.rb', line 11 def initialize(version) @version = version @segments = nil end |