Skip to content

Instantly share code, notes, and snippets.

@maiha
Last active June 27, 2018 04:54
Show Gist options
  • Save maiha/2103b96135b5d53463d1bc5da315f17d to your computer and use it in GitHub Desktop.
Save maiha/2103b96135b5d53463d1bc5da315f17d to your computer and use it in GitHub Desktop.
Crystal breaking changes

std

JSON

  • JSON::Type is moved to JSON::Any::Type
-  def [](key) : YAML::Type
+  def [](key) : YAML::Any::Type

Time

  • Time::Kind is now renamed to Time::Location
-        Time.new value, Time::Kind::Utc
+        Time.new value, Time::Location::UTC
  • Time.new rejects Int64 for year.
-        Time.new(year, month, day, hour, minute, second, nanosecond: microseconds * 1000, kind: Time::Kind::Utc)
+        Time.new(year.to_i32, month, day, hour, minute, second, nanosecond: microseconds * 1000, location: Time::Location::UTC)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment