Crystal 0.24.1 has been released!
As any release it includes numerous bugfixes, cool features and performance improvements - in 387 commits since 0.23.1.
0.24.0 was a preview release so this is the canonical realease following 0.23.1.
Exciting Changes
- Added
ThinLTO
support for LLVM 4.0 and above, which speeds up release builds. It can be activated using the compiler option--lto=thin
. - (breaking-change)
SecureRandom
is renamed toRandom::Secure
andSecureRandom.uuid
is replaced by a newUUID
type, created usingUUID.random
. BigDecimal
was added, it offers arbitrary precision, exact decimal numbers. SupplementingBigInt
andBigFloat
with all three being included usingrequire "big"
.Set
instances can now be used as condition forcase
, matching when the case variable is included in the set.- (breaking-change)
Time::Format
more robustly supports parsing sub-second precision. Tempfile
now supports custom extensions.- The docs generator outputs documentation as JSON which can be easily parsed and used for external applications. The output directory of the docs generator can be configured using
--output
flag. - Garbage collection can be disabled using compiler flag
-Dgc_none
. - The default hash function uses an algorithm based on FunnyHash which is resiliant against DoS attacks.
- (breaking-change)
HTML.escape
only escapes HTML special characters&<>"'
.HTML.escape
recognizes all HTML5 named entities. - (breaking-change) Multiple assignment can no longer be used to create an array (
a = 1, 2, 3
). - (breaking-change)
skip
macro method was renamed toskip_file
. rescue
,ensure
andelse
blocks can be used directly indo ...end
blocks.
%w(foo bar).each do |x|
raise x
rescue e
p e
end
fun
names and lib function calls can now start with uppercase.- YAML 1.1 core schema is now fully supported.
Time
andTime::Span
have nanosecond precision.Time.monotonic
andTime.measure { ... }
allow reading and measuring time using a monotonic clock not influences by time zones, leap seconds and time corrections.Crystal.main
was added to allow more easily redefining themain
of a program.- Named tuples can be merged using
NamedTuple#merge(other : NamedTuple)
. YAML
andJSON
mappings supportpresence: true
option.Dir
has two new class methods:children
andeach_child { ... }
which include all entries except.
and..
.
Other Breaking Changes
- (breaking-change)
HTTP::Client#post_form
is nowHTTP::Client.post(form: ...)
- (breaking-change)
Array#reject!
,Array#compact!
andArray#select!
now returnself
- (breaking-change) Remove the possibility to require
big_int
,big_float
orbig_rational
individually: userequire \"big\"
instead - (breaking-change) Spec: remove
expect_raises
without type argument - (breaking-change)
IO
is now a class, no longer a module - (breaking-change) Time constructors now have
nanosecond
andkind
as named argument - (breaking-change) Removed
XML.escape
. UseHTML.escape
instead - (breaking-change) Removed
macro def
- (breaking-change) To define a custom
hash
method you must now definehash(hasher)
- (breaking-change)
Flate::Reader.new(&block)
andFlate::Writer.new(&block)
now use the nameopen
- (breaking-change) Use an Enum for Process stdio redirections
- (breaking-change) Remove ‘$0’ special syntax
- (breaking-change)
StaticArray#map
andSlice#map
now return their same type instead ofArray
- (breaking-change)
Tuple#map_with_index
now returns a Tuple.
Thanks to everyone who supported this release through contributions, reviews and suggestions.
Crystal 0.24.1 has been released!
As any release it includes numerous bugfixes, cool features and performance improvements - in 387 commits since 0.23.1.
0.24.0 was a preview release so this is the canonical realease following 0.23.1.
Exciting Changes
ThinLTO
support for LLVM 4.0 and above, which speeds up release builds. It can be activated using the compiler option--lto=thin
.SecureRandom
is renamed toRandom::Secure
andSecureRandom.uuid
is replaced by a newUUID
type, created usingUUID.random
.BigDecimal
was added, it offers arbitrary precision, exact decimal numbers. SupplementingBigInt
andBigFloat
with all three being included usingrequire "big"
.Set
instances can now be used as condition forcase
, matching when the case variable is included in the set.Time::Format
more robustly supports parsing sub-second precision.Tempfile
now supports custom extensions.--output
flag.-Dgc_none
.HTML.escape
only escapes HTML special characters&<>"'
.HTML.escape
recognizes all HTML5 named entities.a = 1, 2, 3
).skip
macro method was renamed toskip_file
.rescue
,ensure
andelse
blocks can be used directly indo ...end
blocks.fun
names and lib function calls can now start with uppercase.Time
andTime::Span
have nanosecond precision.Time.monotonic
andTime.measure { ... }
allow reading and measuring time using a monotonic clock not influences by time zones, leap seconds and time corrections.Crystal.main
was added to allow more easily redefining themain
of a program.NamedTuple#merge(other : NamedTuple)
.YAML
andJSON
mappings supportpresence: true
option.Dir
has two new class methods:children
andeach_child { ... }
which include all entries except.
and..
.Other Breaking Changes
HTTP::Client#post_form
is nowHTTP::Client.post(form: ...)
Array#reject!
,Array#compact!
andArray#select!
now returnself
big_int
,big_float
orbig_rational
individually: userequire \"big\"
insteadexpect_raises
without type argumentIO
is now a class, no longer a modulenanosecond
andkind
as named argumentXML.escape
. UseHTML.escape
insteadmacro def
hash
method you must now definehash(hasher)
Flate::Reader.new(&block)
andFlate::Writer.new(&block)
now use the nameopen
StaticArray#map
andSlice#map
now return their same type instead ofArray
Tuple#map_with_index
now returns a Tuple.Thanks to everyone who supported this release through contributions, reviews and suggestions.