Backward compatibility to Crystal 1.3

This commit is contained in:
Vitalii Elenhaupt 2022-04-03 19:17:47 +03:00
parent 7192b64df0
commit 087f470f15
No known key found for this signature in database
GPG key ID: CD0BF17825928BC0
7 changed files with 94 additions and 12 deletions

View file

@ -1,5 +1,4 @@
require "../../spec_helper"
require "semantic_version"
module Ameba::AST
struct Test
@ -77,12 +76,7 @@ module Ameba::AST
CRYSTAL
node = as_nodes(s).nil_literal_nodes.first
source = subject.node_source node, s.split("\n")
if SemanticVersion.parse(Crystal::VERSION) <= SemanticVersion.parse("0.35.1")
source.should be_nil
else
source.should eq "nil"
end
source.should eq "nil"
end
end