Skip to content

Commit

Permalink
Add Regex replacement to remove extra characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Giorgi Kavrelishvili authored and Giorgi Kavrelishvili committed May 12, 2024
1 parent 49c2a9e commit 8dd4cc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/grip/application.cr
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ module Grip

if @environment != "test"
{% begin %}
{% version = Crystal::VERSION.split(".").map(&.to_i) %}
{% version = Crystal::VERSION.gsub(/[^0-9.]/, "").split(".").map(&.to_i) %}

{% major = version[0] %}
{% minor = version[1] %}
Expand Down

0 comments on commit 8dd4cc3

Please sign in to comment.