Skip to content

Commit

Permalink
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions spec/std/proc_spec.cr
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ describe "Proc" do
f = ->(x : Int32) { x.to_f }
f.to_s(str)
# TODO: Change to .starts_with? "0.18.1" once 0.18.1 is released
{% if Crystal::VERSION.starts_with?("0.18.0+") %}
{% if Crystal::VERSION.starts_with?("0.18.0+") || Crystal::VERSION == "0.18.1" %}
str.to_s.should eq("#<Proc(Int32, Float64):0x#{f.pointer.address.to_s(16)}>")
{% else %}
str.to_s.should eq("#<(Int32 -> Float64):0x#{f.pointer.address.to_s(16)}>")
@@ -19,7 +19,7 @@ describe "Proc" do
f = ->(x : Int32) { x + a }
f.to_s(str)
# TODO: Change to .starts_with? "0.18.1" once 0.18.1 is released
{% if Crystal::VERSION.starts_with?("0.18.0+") %}
{% if Crystal::VERSION.starts_with?("0.18.0+") || Crystal::VERSION == "0.18.1" %}
str.to_s.should eq("#<Proc(Int32, Float64):0x#{f.pointer.address.to_s(16)}:closure>")
{% else %}
str.to_s.should eq("#<(Int32 -> Float64):0x#{f.pointer.address.to_s(16)}:closure>")
@@ -30,7 +30,7 @@ describe "Proc" do
str = MemoryIO.new
f = ->(x : Int32) { x.to_f }
# TODO: Change to .starts_with? "0.18.1" once 0.18.1 is released
{% if Crystal::VERSION.starts_with?("0.18.0+") %}
{% if Crystal::VERSION.starts_with?("0.18.0+") || Crystal::VERSION == "0.18.1" %}
f.to_s.should eq("#<Proc(Int32, Float64):0x#{f.pointer.address.to_s(16)}>")
{% else %}
f.to_s.should eq("#<(Int32 -> Float64):0x#{f.pointer.address.to_s(16)}>")
@@ -42,7 +42,7 @@ describe "Proc" do
a = 1.5
f = ->(x : Int32) { x + a }
# TODO: Change to .starts_with? "0.18.1" once 0.18.1 is released
{% if Crystal::VERSION.starts_with?("0.18.0+") %}
{% if Crystal::VERSION.starts_with?("0.18.0+") || Crystal::VERSION == "0.18.1" %}
f.to_s.should eq("#<Proc(Int32, Float64):0x#{f.pointer.address.to_s(16)}:closure>")
{% else %}
f.to_s.should eq("#<(Int32 -> Float64):0x#{f.pointer.address.to_s(16)}:closure>")
2 changes: 1 addition & 1 deletion spec/std/tuple_spec.cr
Original file line number Diff line number Diff line change
@@ -271,7 +271,7 @@ describe "Tuple" do
it "does types" do
tuple = {1, 'a', "hello"}
# TODO: Change to .starts_with? "0.18.1" once 0.18.1 is released
{% if Crystal::VERSION.starts_with?("0.18.0+") %}
{% if Crystal::VERSION.starts_with?("0.18.0+") || Crystal::VERSION == "0.18.1" %}
tuple.types.to_s.should eq("Tuple(Int32, Char, String)")
{% else %}
tuple.types.to_s.should eq("{Int32, Char, String}")

0 comments on commit 08c33dd

Please sign in to comment.