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
- (breaking change)
YAML::Emitter
was renamed toYAML::Builder
, and some of its methods were also renamed. It can now used for any YAML serialization usingYAML.build
. - (breaking change)
to_json
methods now receives aJSON::Builder
instead of anIO
. It can now used for any YAML serialization usingJSON.build
. If you are usingJSON.mapping
then your code will continue to work without changes. XML::Builder
allows to serialize XML format usingXML.build
.- (breaking change)
MemoryIO
was removed in favour ofIO::Memory
. with ... yield
now 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
- (breaking change) Defining a
finalize
method 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 iffoo
is invoked without arguments) (thanks @MakeNowJust) - (breaking change)
each
methods 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#step
now requires named arguments,to
andby
, 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#content
now returns an emptyString
when no content is available
Thanks to everyone who supported this release through contributions, reviews and suggestions.
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
YAML::Emitter
was renamed toYAML::Builder
, and some of its methods were also renamed. It can now used for any YAML serialization usingYAML.build
.to_json
methods now receives aJSON::Builder
instead of anIO
. It can now used for any YAML serialization usingJSON.build
. If you are usingJSON.mapping
then your code will continue to work without changes.XML::Builder
allows to serialize XML format usingXML.build
.MemoryIO
was removed in favour ofIO::Memory
.with ... yield
now works well withmethod_missing
.Other Breaking Changes
finalize
method on a struct now gives a compile errordef foo(x : Int32 = nil)
will now fail to compile iffoo
is invoked without arguments) (thanks @MakeNowJust)each
methods now returnNil
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)Number#step
now requires named arguments,to
andby
, to avoid argument order confusionXML::Node#[]
now always returns aString
(previously it could also returnNil
, which was incorrect)XML::Node#content
now returns an emptyString
when no content is availableThanks to everyone who supported this release through contributions, reviews and suggestions.