crystal v0.27.0 Release Notes
Release Date: 2018-11-01 // over 5 years ago-
Language changes
- (breaking-change) Disallow comma after newline in argument list. (#6514, thanks @asterite)
Macros
- โ Add
Generic#resolve
andGeneric#resolve?
macro methods. (#6617, thanks @asterite)
Standard library
- ๐ Fixed
v1
,v2
,v3
,v4
,v5
methods ofUUID
. (#6952, thanks @r00ster91) - ๐ Fixed multiple docs typos and phrasing in multiple places. (#6778, #6963, thanks @r00ster91)
- ๐ Fixes
Pointer
/UInt
subtraction. (#6994, thanks @damaxwell) - โ Add stack overflow detection. (#6928, #6995, thanks @damaxwell)
- โ Add caller file and line to
Nil#not_nil!
. (#6712, thanks @yeeunmariakim) - ๐ Restrict
Enum#parse
/Enum#parse?
toString
arguments. (#6654, thanks @vladfaust) - ๐จ Refactor and unify printing exceptions from within fibers. (#6594, thanks @Sija)
- ๐ Improve docs on properties generated by
property?
. (#6682, thanks @epergo) - โ Add docs to top level namespace constants. (#6971, thanks @r00ster91)
Macros
- ๐ Fix typos in
StringLiteral#gsub
and#tr
errors. (#6925, thanks @r00ster91)
Numeric
- (breaking-change) Disallow
rand
with zero value. (#6686, thanks @oprypin) - (breaking-change) Let
==
and!=
compare the values instead of bits when dealing with signed vs unsigned integers. (#6689, thanks @asterite) - ๐ Fixed
Int#downto
with unsigned int. (#6678, thanks @gmarcais) - โ Add wrapping arithmetics operators
&+
&-
&*
. (#6890, thanks @bcardiff) - โ Add floor divisions operator
Int#//
andFloat#//
. (#6891, thanks @bcardiff) - โ Add random support for
BigInt
. (#6687, thanks @oprypin) - โ Add docs related to
Float::Printer::*
. (#5438, thanks @Sija)
Text
- โ Add
String::Builder#chomp!
returns self. (#6583, thanks @Sija) - โ Add
:default
to colorize and documentColorRGB
,Color256
. (#6427, thanks @r00ster91) - โ Add
String::Formatter
support forc
flag and improve docs. (#6758, thanks @r00ster91)
Collections
- (breaking-change) Replace
Indexable#at
with#fetch
. RemoveHash#fetch(key)
as alias ofHash#[]
. (#6296, thanks @AlexWayfer) - โ Add
Hash/Indexable#dig/dig?
. (#6719, thanks @Sija) - โ Add
Iterator.chain
to chain array of iterators. (#6570, thanks @xqyww123) - โ Add
NamedTuple#to_h
over empty tuples. (#6628, thanks @icyleaf) - โก๏ธ Optimize
Indexable#join
when all elements are strings. (#6635, thanks @asterite) - โก๏ธ Optimize
Array#skip
. (#6946, thanks @asterite)
Serialization
- ๐ Fixed
YAML::Schema::FailSafe.parse
andparse_all
. (#6790, thanks @r00ster91) - ๐ Fixed order of
xmlns
and prefix inXML::Builder#namespace
. (#6743, thanks @yeeunmariakim) - ๐ Fixed
CSV.build
quoting ofChar
andSymbol
. (#6904, thanks @maiha) - ๐ Fixed docs for
JSON::Serializable
. (#6950, thanks @Heaven31415) - โ Add
XML::Attributes#delete
. (#6910, thanks @joenas) - โ Add ability to quote values always in
CSV.build
. (#6723, thanks @maiha) - ๐จ Refactor how empty properties are handled in
JSON::Serializable
andYAML::Serializable
. (#6539, thanks @r00ster91)
Time
- (breaking-change) Rename
Time#epoch
toTime#to_unix
. Also#epoch_ms
to#to_unix_ms
, and#epoch_f
to#to_unix_f
. (#6662, thanks @straight-shoota) - ๐ Fixed spec for
Time::Location.load_local
withTZ=nil
. (#6740, thanks @straight-shoota) - โ Add support for ISO calendar week to
Time
. (#6681, thanks @straight-shoota) - โ Add
Time::Format
support for%G
,%g
,%V
. (#6681, thanks @straight-shoota) - โ Add
Time::Location
loader support for Windows. (#6363, thanks @straight-shoota) - Add
Time#to_local_in
to change time zone while keeping wall clock. (#6572, thanks @straight-shoota) - Add
Time::UNIX_EPOCH
and drop privateUNIX_SECONDS
constant. (#6908, thanks @j8r) - ๐ Change
Time::DayOfWeek
to ISO ordinal numbering based onMonday = 1
. (#6555, thanks @straight-shoota) - ๐จ Refactor time specs. (#6574, thanks @straight-shoota)
- โ Add docs for singular method aliases, add
Int#microsecond
alias. (#6297, thanks @Sija)
Files
- (breaking-change) Remove
Tempfile
. UseFile.tempfile
orFile.tempname
. (#6485, thanks @straight-shoota) - ๐ Fixed missing closed status check of FDs when creating a subprocess. (#6641, thanks @Timbus)
- ๐ Fixed
ChecksumReader.write
error message. (#6889, thanks @r00ster91) - โ Add
File#delete
,Dir#tempdir
and improveFile
docs. (#6485, thanks @straight-shoota) - โ Add
File#fsync
to flush all data written into the file to the disk device. (#6793, thanks @carlhoerberg) - โ Add
DEVNULL
to docs. (#6642, thanks @r00ster91) - ๐ Improve checks for FreeBSD version due to breaking API changes. (#6629, thanks @myfreeweb)
- ๐ Improve performance of
Zlib::Reader
,Gzip::Reader
andFlate::Reader
by includingIO::Buffered
. (#6916, thanks @asterite) - ๐จ Refactor
Crystal::System::FileDescriptor
to use@fd
ivar directly. (#6703, thanks @straight-shoota) - Refactor
{Zlib,Gzip,Flate}::Reader#unbuffered_rewind
to usecheck_open
. (#6958, thanks @Sija)
Networking
- (breaking-change) Remove deprecated alias
HTTP::Server#bind_ssl
. UseHTTP::Server#bind_tls
. (#6699, thanks @straight-shoota) - โ Add
Socket::Address#pretty_print
and#inspect
. (#6704, thanks @straight-shoota) - โ Add
Socket::IPAddress
loopback, unspecified and broadcast methods/constants. (#6710, thanks @straight-shoota) - Fixed
Socket#reuse_port?
ifSO_REUSEPORT
is not supported. (#6706, thanks @straight-shoota) - ๐ Fixed
TCPServer
handling ofreuse_port
. (#6940, thanks @RX14) - โ Add docs to demonstrate parameters for
HTTP::Client
. (#5145, thanks @HCLarsen) - โ Add docs examples to
Socket::Server#accept
. (#6705, thanks @straight-shoota) - ๐จ Refactor
socket_spec.cr
into separate files. (#6700, thanks @straight-shoota) - ๐จ Refactor specs of
HTTP::Client
to remove inheritance for test server. (#6909, thanks @straight-shoota) - ๐ Improve specs for
HTTP::Server#close
. (#5958, thanks @straight-shoota) - ๐ Improve specs for socket. (#6711, thanks @straight-shoota)
Crypto
- ๐ Fixed OpenSSL bindings to work with LibreSSL. (#6917, thanks @LVMBDV)
- โ Add support for OpenSSL 1.1.1. (#6738, thanks @ysbaddaden)
Concurrency
- ๐ Improve POSIX threads integration regarding locking, error and resource management. (#6944, thanks @ysbaddaden)
- โ Remove unintended public methods from
Channel
. (#6714, thanks @asterite) - ๐จ Refactor
Fiber
/Scheduler
to isolate responsibilities. (#6897, thanks @ysbaddaden) - ๐จ Refactor specs that relied on
Fiber.yield
behavior. (#6953, thanks @ysbaddaden)
System
- ๐ Fixed fork and signal child handlers. (#6426, thanks @ysbaddaden)
- ๐ Use blocking
IO
on a TTY if it can't be reopened. (#6660, thanks @Timbus) - ๐จ Refactor
Process
in preparation for Windows support. (#6744, thanks @RX14)
Spec
- ๐ Allow
pending
to be used without blocks. (#6732, thanks @tswicegood) - โ Add
be_empty
expectation. (#6614, thanks @mamantoha) - โ Add specs for expectation methods. (#6512, thanks @rodrigopinto)
Compiler
- ๐ Fixed don't "ambiguous match" if there's an exact match. (#6618, thanks @asterite)
- ๐ Fixed allow annotations inside enums. (#6713, thanks @asterite)
- ๐ Fixed
super
inside macros will honor arguments. (#6638, thanks @asterite) - ๐ Fixed guessed ivar type from splat arguments. (#6648, thanks @MakeNowJust)
- ๐ Fixed
ASTNode#to_s
of non-unary operator call without argument. (#6538, thanks @MakeNowJust) - ๐ Fixed
ASTNode#to_s
for multiline macro expression. (#6666, thanks @MakeNowJust) - ๐ Fixed
ASTNode#to_s
for{% verbatim do %} ... {% end %}
. (#6665, thanks @MakeNowJust) - ๐ Fixed empty case statement normalization. (#6915, thanks @straight-shoota)
- ๐ Fixed codegen of tuple elements with unreachable elements. (#6659, thanks @MakeNowJust)
- ๐ Fixed parsing of
//
corner cases. (#6927, thanks @bcardiff) - ๐ Fixed recursive block expansion check for non
ProcNotation
restriction. (#6932, thanks @MakeNowJust) - ๐ Fixed corner case of expressions not typed on main phase but typed on cleanup phase. (#6720, thanks @MakeNowJust)
- ๐ Improve error traces regarding
return
,next
andbreak
. (#6633, thanks @asterite) - โ Add resolve generics typenodes in macros. (#6617, thanks @asterite)
- โ Add support for multiple output values in inline asm. (#6680, thanks @RX14)
- ๐ Improve parsing of
asm
operands. (#6688, thanks @RX14) - ๐จ Refactor rescue block codegen for Windows. (#6649, thanks @RX14)
Tools
- ๐ Improve installation section in README template. (#6914, #6942, thanks @r00ster91)
- ๐ Improve contributors section in README template. (#7005, thanks @r00ster91)
Formatter
- ๐ Fixed formatting of
{% verbatim do %} ... {% end %}
outside macro. (#6667, thanks @MakeNowJust) - ๐ Fixed formatting of
//
corner cases. (#6927, thanks @bcardiff) - ๐ Improve formatting of
asm
operands. (#6688, thanks @RX14)
Doc generator
- โ Add support for comments after
:nodoc:
marker. (#6627, thanks @Sija) - ๐ Fixed browser performance issue with blur filter. (#6764, thanks @girng)
- Accessibility improvement in search field. (#6926, thanks @jodylecompte)
Others
- CI improvements and housekeeping. (#6658, #6739, #6930, thanks @bcardiff, @RX14)
- โ Add
VERSION
file and support for specifying the build commit. (#6966, thanks @bcardiff) - โ Add support for specifying the build date. (#6788, thanks @peterhoeg)
- โก๏ธ Update Contributing section in
README.md
. (#6911, thanks @r00ster91)