Skip to content

Fix all specs and deprecation warnings for Crystal 0.31.1#43

Open
ndbroadbent wants to merge 3 commits intowaterlink:masterfrom
DocSpring:updates_for_0.31.1
Open

Fix all specs and deprecation warnings for Crystal 0.31.1#43
ndbroadbent wants to merge 3 commits intowaterlink:masterfrom
DocSpring:updates_for_0.31.1

Conversation

@ndbroadbent
Copy link

@ndbroadbent ndbroadbent commented Dec 6, 2019

I fixed all the specs and deprecation warnings for Crystal 0.31.1:

$ crystal spec
.......................................................

Finished in 3.85 milliseconds
55 examples, 0 failures, 0 errors, 0 pending

Changes:

Fix Arithmetic overflow (OverflowError) in the hash calculations

Crystal added new "wrapping" arithmetic operators in 0.27.0, and the hash calculations now raise an OverflowError unless these are used.

Fix Time.now deprecation

Time.now was deprecated in Crystal 0.28.0, and needs to be replaced with Time.local.

Need to mock Crystal::System::File.exists?

(Not sure when this changed, or if it's related to other changes in the Crystal language.)

So I updated the test to mock Crystal::System::File, which fixes the failing test. (But maybe this is just a temporary workaround.)

Original PRs:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant