Crystal 0.20.4 released!
Crystal 0.20.4 has been released!
As any release it includes numerous bugfixes, cool features and performance improvements - in 87 commits since 0.20.3.
Exciting Changes
Section titled Exciting Changes- (breaking change)
YAML::Emitterwas renamed toYAML::Builder, and some of its methods were also renamed. It can now used for any YAML serialization usingYAML.build. - (breaking change)
to_jsonmethods now receives aJSON::Builderinstead of anIO. It can now used for any YAML serialization usingJSON.build. If you are usingJSON.mappingthen your code will continue to work without changes. XML::Builderallows to serialize XML format usingXML.build.- (breaking change)
MemoryIOwas removed in favour ofIO::Memory. with ... yieldnow works well withmethod_missing.- Class variables can now be used in generic types (all generic instances share the same variable, and subclasses get their own copy, as usual).
- Added support for LLVM 4.
Other Breaking Changes
Section titled Other Breaking Changes- (breaking change) Defining a
finalizemethod on a struct now gives a compile error - (breaking change) Default argument types now must match their restriction, if any (for example
def foo(x : Int32 = nil)will now fail to compile iffoois invoked without arguments) (thanks @MakeNowJust) - (breaking change)
eachmethods now returnNil - (breaking change)
IO#skip(bytes)will now raise if there aren’t at least the given amount of bytes in theIO(previously it would work well if there were less bytes, and it would hang if there were more) - (breaking change)
Number#stepnow requires named arguments,toandby, to avoid argument order confusion - (breaking change)
XML::Node#[]now always returns aString(previously it could also returnNil, which was incorrect) - (breaking change)
XML::Node#contentnow returns an emptyStringwhen no content is available
Thanks to everyone who supported this release through contributions, reviews and suggestions.