Class: SyntaxTree::Formatter::SemanticVersion

Inherits:
Gem::Version
  • Object
show all
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

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