Changelog History
Page 3
-
v0.34.0 Changes
April 06, 2020Language changes
- (breaking-change) Exhaustive
case
expression check added, for now it produces warnings. (#8424, #8962, thanks @asterite, @Sija) - Let
Proc(T)
be used as aProc(Nil)
. (#8969, #8970, thanks @asterite)
Standard library
- (breaking-change) Replace
Errno
,WinError
,IO::Timeout
withRuntimeError
,IO::TimeoutError
,IO::Error
,File::Error
,Socket::Error
, and subclasses. (#8885, thanks @waj) - (breaking-change) Replace
Logger
module in favor ofLog
module. (#8847, #8976, thanks @bcardiff) - (breaking-change) Move
Adler32
andCRC32
toDigest
. (#8881, thanks @bcardiff) - (breaking-change) Remove
DL
module. (#8882, thanks @bcardiff) - Enable more win32 specs. (#8683, #8822, thanks @straight-shoota)
- 🚀 Make
SemanticVersion::Prerelease
comparable. (#8991, thanks @MakeNowJust) - 👉 Use
flag?(:i386)
instead of obsoleteflag?(:i686)
. (#8863, thanks @bcardiff) - ✂ Remove Windows workaround using
vsnprintf
. (#8942, thanks @oprypin) - 🛠 Fixed docs broken link to ruby's prettyprint source. (#8915, thanks @matthin)
- ⚡️ Update
OptionParser
example to exit on--help
. (#8927, thanks @vlazar)
Numeric
- 🛠 Fixed
Float32#to_s
corner-case. (#8838, thanks @toddsundsted) - Fixed make
Big*#to_u
raise on negative values. (#8826, thanks @Sija) - Fixed
BigDecimal#to_big_i
regression. (#8790, thanks @Sija) - ➕ Add
Complex#round
. (#8819, thanks @miketheman) - Add
Int#bit_length
andBigInt#bit_length
. (#8924, #8931, thanks @asterite) - 🛠 Fixed docs of
Int#gcd
. (#8894, thanks @nard-tech)
Text
- (breaking-change) Deprecate top-level
with_color
in favor ofColorize.with
. (#8892, #8958, thanks @bcardiff, @oprypin) - ➕ Add overloads for
String#ljust
,String#rjust
andString#center
that take anIO
. (#8923, thanks @asterite) - ➕ Add missing
Regex#hash
andRegex::MatchData#hash
. (#8986, thanks @MakeNowJust) - ⬆️ Upgrade Unicode to 13.0.0. (#8906, thanks @Blacksmoke16)
- ⏪ Revert deprecation of
String#codepoint_at
. (#8902, thanks @vlazar) - 🚚 Move
Iconv
toCrystal
namespace. (#8890, thanks @bcardiff)
Collections
- 🛠 Fixed make
Range#size
raise on an open range. (#8829, thanks @Sija) - ➕ Add
Enumerable#empty?
. (#8960, thanks @Sija) - 🐎 (performance) Optimized Implementation of
Array#fill
for zero Values. (#8903, thanks @toddsundsted) - 🔨 Refactor
Reflect
to anEnumerable
private definition. (#8884, thanks @bcardiff)
Serialization
- (breaking-change) Rename
YAML::Builder.new
with block toYAML::Builder.build
. (#8896, thanks @straight-shoota) - ➕ Add
XML.build_fragment
. (#8813, thanks @straight-shoota) - ➕ Add
CSV#rewind
. (#8912, thanks @asterite) - Add
Deque#from_json
andDeque#to_json
. (#8850, thanks @carlhoerberg) - 🏗 Call to
IO#flush
onCSV
,INI
,JSON
,XML
, andYAML
builders. (#8876, thanks @asterite) - ➕ Add docs to
Object.from_yaml
. (#8800, thanks @wowinter13)
Time
- (breaking-change) Improve
Time::Span
initialization API with mandatory named arguments. (#8257, #8857, thanks @dnamsons, @bcardiff) - ➕ Add
Time::Span#total_microseconds
. (#8966, thanks @vlazar)
Files
- 🛠 Fixed multi-thread race condition by setting
fd
to-1
on closedFile
/Socket
. (#8873, thanks @bcardiff) - 🛠 Fixed
File.dirname
with unicode chars. (#8911, thanks @asterite) - Add
IO::Buffered#flush_on_newline
back and set it to true for non-tty. (#8935, thanks @asterite) - Forward missing methods of
IO::Hexdump
to underlyingIO
. (#8908, thanks @carlhoerberg)
Networking
- (breaking-change) Correctly support WebSocket close codes. (#8975, #8981, thanks @RX14, @Sija)
- 👉 Make
HTTP::Client
return emptybody_io
if content-length is zero. (#8503, thanks @asterite) - 🛠 Fixed
UDP
specs in the case of a local firewall. (#8817, thanks @RX14) - 🛠 Fixed
MIME
spec examples to not collide with actual registry. (#8795, thanks @straight-shoota) - 🛠 Fixed
UNIXServer
, andHTTP::WebSocket
specs to ensure server is accepting before closing. (#8755, #8879, thanks @bcardiff) - ➕ Add type annotation to
tls
argument inHTTP
. (#8678, thanks @j8r) - ➕ Add
Location
toHTTP::Request
common header names. (#8992, thanks @mamantoha)
Concurrency
- ➕ Add docs on
Future
regarding exceptions. (#8860, thanks @rdp) - Disable occasionally failing
Thread
specs on musl. (#8801, thanks @straight-shoota)
System
- 🛠 Fixed typo on
src/signal.cr
. (#8805, thanks @lbguilherme)
⚙ Runtime
- 🛠 Fixed exceptions not being inspectable when running binary from PATH. (#8807, thanks @willhbr)
- 🚚 Move
AtExitHandlers
toCrystal
namespace. (#8883, thanks @bcardiff)
Compiler
- (breaking-change) Drop
disable_overflow
compiler flag. (#8772, thanks @Sija) - 🛠 Fixed url in "can't infer block return type" error message. (#8869, thanks @nilium)
- 🛠 Fixed typo in math interpreter error message. (#8941, thanks @j8r)
- 0️⃣ Use
CRYSTAL_OPTS
environment variable as default compiler options. (#8900, thanks @bcardiff) - ⚠ Avoid using the default
--exclude-warnings
value if some is specified. (#8899, thanks @bcardiff) - 0️⃣ Honor
LIBRARY_PATH
as default library path, and allow linking with no explicit/usr/lib:/usr/local/lib
paths. (#8948, thanks @bcardiff) - 🛠 Fix Windows LLVM globals codegen in non-single-module mode. (#8978, thanks @oprypin)
- ➕ Add support for LLVM 10. (#8940, thanks @RX14)
- ✂ Remove redundant calls to
Object.to_s
in interpolation in compiler's code. (#8947, thanks @veelenga)
Language semantics
- Type as
NoReturn
if calling method on abstract class with no concrete subclasses. (#8870, thanks @asterite)
Tools
- ➕ Add
crystal init
name validation. (#8737, thanks @straight-shoota)
Doc generator
- ⚠ Show warnings on docs command. (#8880, thanks @bcardiff)
Others
- (breaking-change) Exhaustive
-
v0.33.0 Changes
February 14, 2020Language changes
Macros
- ➕ Add
TypeNode#name(generic_args : BoolLiteral)
to returnTypeNode
's name with or without type vars. (#8483, thanks @Blacksmoke16)
Standard library
- (breaking-change) Remove several previously deprecated methods and modules:
PartialComparable
,Crypto::Bcrypt::Password#==
,HTTP::Server::Response#respond_with_error
,JSON::PullParser::Kind#==
,Symbol#==(JSON::PullParser::Kind)
,JSON::Token#type
,String#at
,Time.new
,Time.now
,Time.utc_now
,URI.escape
,URI.unescape
. (#8646, #8596, thanks @bcardiff, @Blacksmoke16) - 🛠 Fixed docs wording. (#8606, #8784, thanks @fxn)
- ➕ Add
Object#in?
. (#8720, #8723, thanks @Sija) - 👍 Allow to create an enum from a symbol. (#8634, thanks @bew)
- ➕ Add
VaList#next
for getting the next element in a variadic argument list. (#8535, #8688, thanks @ffwff, @RX14) - 🔨 Refactor
ARGF
implementation. (#8593, thanks @arcage) - 🛠 Fixed specs of
Colorize
on dumb terminal. (#8673, thanks @oprypin) - 🛠 Fixed some specs on Win32. (#8670, thanks @straight-shoota)
Numeric
- ➕ Add
BigInt#unsafe_shr
. (#8763, thanks @asterite) - 🔨 Refactor
Float#fdiv
to use binary primitive. (#8662, thanks @bcardiff)
Text
Collections
- 🛠 Fixed
Enumerable#zip
to work with union types. (#8621, thanks @asterite) - 🛠 Fixed docs regarding
Hash
'sinitial_capacity
. (#8569, thanks @r00ster91)
Serialization
- 👌 Improved JSON deserialization into union types. (#8689, thanks @KimBurgess)
- 🛠 Fixed expected error message in libxml2 error spec. (#8699, thanks @straight-shoota)
- 🛠 Fixed
JSON::PullParser
overflow handling. (#8698, thanks @KimBurgess) - 🛠 Fixed
JSON::Any#dig?
/YAML::Any#dig?
on non-structure values. (#8745, thanks @Sija)
Time
- 🛠 Fixed
Time#shift
over date boundaries with zone offset. (#8742, thanks @straight-shoota)
Files
- (breaking-change) Deprecate
File::Info#owner
, andFile::Info#group
; useowner_id
, andgroup_id
. (#8007, thanks @j8r) - 🛠 Fixed
Path.new
receivingPath
as first argument. (#8753, thanks @straight-shoota) - 🛠 Fixed
File.size
andFile.info
to work withPath
parameters. (#8625, thanks @snluu) - 🛠 Fixed
Path
specs whenENV["HOME"]
is unset. (#8667, thanks @straight-shoota) - Refactor
Dir.mkdir_p
to usePath#each_parent
and make it work on Win32. (#8668, thanks @straight-shoota) - 🛠 Fixed
IO::MultiWriter
specs to close file before reading/deleting it. (#8674, thanks @oprypin)
Networking
- 🛠 Fixed invalid call to libevent and race conditions on closed
IO
when resuming readable/writable event. (#8707, #8733, thanks @bcardiff) - 🛠 Fixed unexpected EOF in terminated SSL connection. (#8540, thanks @rdp)
- 🛠 Fixed
HTTP::Cookie
to supportInt64
max-age values. (#8759, thanks @asterite) - 👌 Improve error message for
getaddrinfo
failure. (#8498, thanks @rdp) - Make
IO::SysCall#wait_readable
andIO::SysCall#wait_writable
public, yet:nodoc:
. (#7366, thanks @stakach) - 🔨 Refactor
StaticFileHandler
to usePath
. (#8672, thanks @straight-shoota) - ✂ Remove fixed date in spec. (#8640, thanks @bcardiff)
- ✂ Remove non-portable error message in
TCPServer
spec. (#8702, thanks @straight-shoota)
Crypto
- ➕ Add
Crypto::Bcrypt::Password
check for invalid hash value. (#6467, thanks @miketheman) - 👌 Improve documentation for
Random::Secure
. (#8484, thanks @straight-shoota)
Concurrency
- 🛠 Fixed
Future(Nil)
when the block raises. (#8650, thanks @lbguilherme) - 🛠 Fixed
IO
closing in multi-thread mode. (#8733, thanks @bcardiff) - 🛠 Fixed some regular failing specs in multi-thread mode. (#8592, #8643, #8724, #8761, thanks @bcardiff)
- ➕ Add docs to
Fiber
. (#8739, thanks @straight-shoota)
System
- Enable
system
module for Win32 in prelude. (#8661, thanks @straight-shoota) - Handle exceptions raised at
__crystal_sigfault_handler
. (#8743, thanks @waj)
⚙ Runtime
- 🛠 Fixed wrongly collected exception object by the GC. Ensure
LibUnwind::Exception
struct is not atomic. (#8728, thanks @waj) - 🛠 Fixed reporting of non-statement rows in DWARF backtrace. (#8499, thanks @rdp)
- ➕ Add top level exception handler. (#8735, #8791, thanks @waj)
- Try to open stdio in non-blocking mode. (#8787, thanks @waj)
- 👍 Allow
Crystal::System.print_error
to useprintf
like format. (#8786, thanks @bcardiff)
Spec
- (breaking-change) Remove previously deprecated spec method
assert
. (#8767, thanks @Blacksmoke16) Spec::JUnitFormatter
output and options enhancements. (#8599, #8692, thanks @Sija, @bcardiff)
Compiler
- (breaking-change) Drop support for previously deprecated comma separators in enums and other cleanups. (#8657, thanks @bcardiff)
- (breaking-change) Drop uppercase F32 and F64 float number suffixes. (#8782, thanks @rhysd)
- 🛠 Fixed memory corruption issues by using LLVM's
memset
andmemcpy
that matches target machine. (#8746, thanks @bcardiff) - 🛠 Fixed ICE when trying to add type inside annotation. (#8628, thanks @asterite)
- 🛠 Fixed ICE on
typeof
in an unused block. (#8695, thanks @asterite) - 🛠 Fixed ICE in case of wrong target triple. (#8710, thanks @Sija)
- 🛠 Fixed ICE when raising a macro exception with empty message. (#8654, thanks @jan-zajic)
- 🛠 Fixed parser bug macro with "eenum" in it. (#8760, thanks @asterite)
- 🔄 Change
CRYSTAL_PATH
to allow shards to override std-lib. (#8752, thanks @bcardiff)
Language semantics
- 🛠 Fixed missing virtualization of
Proc
pointer. (#8757, thanks @asterite) - 🛠 Fixed type of vars after
begin
/rescue
if allrescue
are unreachable. (#8758, thanks @asterite) - 🛠 Fixed visibility propagation to macro expansions in all cases. (#8762, #8796, thanks @asterite)
Tools
- ⚡️ Update
crystal init
to handle.
. (#8681, thanks @jethrodaniel)
Formatter
- 🛠 Fixed indent after comment inside indexer. (#8627, thanks @asterite)
- 🛠 Fixed indent of comments at the end of a proc literal. (#8778, thanks @asterite)
- 🛠 Fixed crash when formating comment after macro. (#8697, thanks @asterite)
- 🛠 Fixed crash when formating
exp.!
. (#8768, thanks @asterite) - ✂ Removes unnecessary escape sequences. (#8619, thanks @RX14)
Doc generator
- (breaking-change) Deprecate
ditto
andnodoc
in favor of:ditto:
and:nodoc:
. (#6362, thanks @j8r) - 📄 Skip creation of
docs/
dir when not needed. (#8718, thanks @Sija)
Others
- CI improvements and housekeeping. (#8580, #8597, #8679, #8779, thanks @bcardiff, @j8r)
- ➕ Add Windows CI using GitHub Actions. (#8676, thanks @oprypin)
- ➕ Add Alpine CI using CircleCI. (#7420, thanks @straight-shoota)
- 🏗 Build Alpine Docker images. (#8708, thanks @straight-shoota)
- 👍 Allow
Makefile
to uselld
if present (Linux only). (#8641, thanks @bcardiff) - Simplify script to determine installed LLVM version. (#8605, thanks @j8r)
- ➕ Add CircleCI test summaries. (#8617, thanks @Sija)
- ➕ Add helper scripts to identify working std-lib specs on Win32. (#8664, thanks @straight-shoota)
- ➕ Add
-
v0.32.1 Changes
December 18, 2019 -
v0.32.0 Changes
December 11, 2019Language changes
- 👍 Allow boolean negation to be written also as a regular method call
expr.!
. (#8445, thanks @jan-zajic)
Macros
- ➕ Add
TypeNode#class_vars
to list class variables of a type in a macro. (#8405, thanks @jan-zajic) - ➕ Add
TypeNode#includers
to get an array of types a module is directly included in. (#8133, thanks @Blacksmoke16) - Add
ArrayLiteral#map_with_index
andTupleLiteral#map_with_index
. (#8049, thanks @Blacksmoke16) - ➕ Add docs for
ArrayLiteral#reduce
. (#8379, thanks @jan-zajic) - ➕ Add
lower:
named argument toStringLiteral#camelcase
. (#8429, thanks @Blacksmoke16)
Standard library
- (breaking-change) Remove
Readline
from std-lib. It's now available as a shard at crystal-lang/crystal-readline (#8364, thanks @ftarulla) - 🚚 Move
Number#clamp
toComparable#clamp
. (#8522, thanks @wontruefree) - 👍 Allow
abort
without arguments. (#8214, thanks @dbackeus) - 👌 Improve error message for not-nil assertion in getters. (#8200, #8296, thanks @icy-arctic-fox)
- ➕ Add
Enum.valid?
. (#5716, thanks @MakeNowJust) - Disable colored output if
TERM=dumb
. (#8271, thanks @ilanpillemer) - 📚 Documentation improvements. (#7656, #8337, #8446, thanks @r00ster91, @vlazar, @cserb)
- ➕ Add docs for pseudo methods. (#8327, #8491, thanks @straight-shoota)
- Code cleanups. (#8270, #8368, #8404, thanks @asterite, @vlazar, @arcage)
Numeric
- 🛠 Fixed
%
andInt#remainder
edge case of min int value against-1
. (#8321, thanks @asterite) - 🛠 Fixed
Int#gcd
types edge case and improve performance. (#7996, #8419, thanks @yxhuvud, @j8r) - ➕ Add
Int#bits
for accessing bit ranges. (#8165, thanks @stakach) - 👍 Allow
Number#round
withUInt
argument. (#8361, thanks @igor-alexandrov)
Text
- (breaking-change) Implement string interpolation as a call to
String.interpolation
. (#8400, thanks @asterite) - (breaking-change) Deprecate
String#codepoint_at
, usechar_at(index).ord
. (#8475, thanks @vlazar) - 🛠 Fixed encoding specs for musl iconv. (#8525, thanks @straight-shoota)
- ➕ Add
String#presence
. (#8345, #8508, thanks @igor-alexandrov, @Sija) - ➕ Add
String#center
. (#8557, thanks @hutou) - 🐎 (performance) Refactor
String#to_utf16
optimizing for ascii-only. (#8526, thanks @straight-shoota) - ➕ Add docs in
Levenshtein
module. (#8386, thanks @katafrakt) - ➕ Add docs to
Regex::Options
. (#8448, thanks @jan-zajic)
Collections
- (breaking-change) Deprecate
Enumerable#grep
, useEnumerable#select
. (#8452, thanks @j8r) - 🛠 Fixed
Enumerable#minmax
,#min
,#max
for partially comparable values. (#8490, thanks @TedTran2019) - 🛠 Fixed
Hash#rehash
. (#8450, thanks @asterite) - 🛠 Fixed
Array
range assignment index out of bounds. (#8347, thanks @asterite) - 🛠 Fixed endless ranged support for
String#[]?
andArray#[]?
. (#8567, thanks @KarthikMAM) - Add
Hash#compare_by_identity
andSet#compare_by_identity
. (#8451, thanks @asterite) - Add
Enumerable#each_cons_pair
andIterator#cons_pair
yielding a tuple. (#8332, thanks @straight-shoota) - Add
offset
argument to allmap_with_index
methods. (#8264, thanks @asterite) - 🐎 (performance) Optimized version of
Tuple#to_a
. (#8265, thanks @asterite) - ➕ Add docs to
Hash.merge!(other : Hash, &)
. (#8380, thanks @jan-zajic) - ➕ Add docs to
Hash.select
. (#8391, thanks @jan-zajic) - ➕ Add docs and specs to
Enumerable.reduce
. (#8378, thanks @jan-zajic)
Serialization
- (breaking-change) Make
XML::Reader#expand
raise, introduceXML::Reader#expand?
for former behavior. (#8186, thanks @Blacksmoke16) - 👍 Allow
JSON.mapping
&YAML.mapping
converter attribute to be applied toArray
andHash
. (#8156, thanks @rodrigopinto) - Add
use_json_discriminator
anduse_yaml_discriminator
to choose type based on property value. (#8406, thanks @asterite) - Remove return type
self
restriction fromObject.from_json
andObject.from_yaml
. (#8489, thanks @straight-shoota)
Files
- (breaking-change) Remove expand home (
~
) by default inFile.expand_path
andPath#expand
, now opt-in argument. (#7903, thanks @didactic-drunk) - Fixed bugs in
Path
regarding#dirname
,#each_part
,#each_parent
. (#8415, thanks @jan-zajic) - 🛠 Fixed
GZip::Reader
andGZip::Writer
to handle large data sizes. (#8421, thanks @straight-shoota) - 🛠 Fixed
File::Info#same_file?
by providing access to 64 bit inode numbers. (#8355, thanks @didactic-drunk)
Networking
- 🛠 Fixed
HTTP::Response#mime_type
returnsnil
on emptyContent-Type
header. (#8464, thanks @Sija) - 🛠 Fixed handling of unidirectional SSL servers hang. (#8481, thanks @rdp)
- ➕ Add
HTTP::Client#write_timeout
. (#8507, thanks @Sija) - ⚡️ Updated mime type of
.js
files totext/javascript
and includeimage/webp
. (#8342, thanks @mamantoha) - 🔨 Refactor websocket protocol GUID string. (#8339, thanks @vlazar)
Crypto
- (breaking-change) Enforce single-line results of
OpenSSL::DigestBase#base64digest
viaBase64.strict_encode
. (#8215, thanks @j8r)
Concurrency
- 🛠 Fixed
Channel
successful sent and raise behavior. (#8284, thanks @firejox) - 🛠 Fixed
Channel#close
to be thread-safe. (#8249, thanks @firejox) - 🛠 Fixed
select
withreceive?
and closed channels. (#8304, thanks @bcardiff) - Faster
Mutex
implementation and policy checks. (#8295, #8563, thanks @waj, @ysbaddaden) - 🐎 (performance) Channel internals refactor and optimize. (#8322, #8497, thanks @firejox, @Sija)
- ➕ Add docs to
Channel#send
andChannel#close
. (#8356, thanks @lbarasti) - Fixed
Thread#gc_thread_handler
for Windows support. (#8519, thanks @straight-shoota)
System
- 🚦 Don't close pipes used for signal handlers in multi-thread mode. (#8465, thanks @waj)
- 🛠 Fixed thread initialization on OpenBSD. (#8293, thanks @wmoxam)
- Implement fibers for win32. (#7995, #8513, thanks @straight-shoota, @firejox)
⚙ Runtime
- Fixed fiber initialization on
-Dgc_none -Dpreview_mt
. (#8280, thanks @bcardiff) - ➕ Add GC profiling stats and warning bindings. (#8281, thanks @bcardiff, @benoist)
- 🔨 Refactor
callstack_spec
. (#8308, #8395, thanks @straight-shoota, @Sija)
Spec
- 🛠 Fixed
--fail-fast
behaviour. (#8453, thanks @asterite) - ➕ Add before, after, and around hooks. (#8302, thanks @asterite)
- Restrict the type returned by
should_not be_nil
and others. (#8412, thanks @asterite) - ➕ Add ability to randomize specs via
--order random|<seed-value>
. (#8310, thanks @Fryguy) - ➕ Add specs for
Spec
filters. (#8242, thanks @Fryguy) - ➕ Add ability to tag specs. (#8068, thanks @Fryguy)
Compiler
- 🛠 Fixed musl libc detection (Alpine 3.10 regression bug). (#8330, thanks @straight-shoota)
- 🛠 Fixed pragmas handling in macros. (#8256, thanks @asterite)
- 🛠 Fixed parser crash for 'alias Foo?'. (#8282, thanks @oprypin)
- 🛠 Fixed parser error on newline before closing parenthesis. (#8320, thanks @MakeNowJust)
- 🛠 Fixed generic subtypes edge cases triggering
no target defs
error. (#8417, thanks @asterite) - 🛠 Fixed cleanup of local vars reachable by macros. (#8529, thanks @asterite)
- ➕ Add support for LLVM 9. (#8358, thanks @RX14)
- ➕ Add
--mcmodel
option to compiler. (#8363, thanks @ffwff) - Disallow
instance_sizeof
on union. (#8399, thanks @asterite) - ➕ Add mention to
crystal <command> --help
in help. (#3628, thanks @rdp) - 👌 Improve error message when a filename is misspelled. (#8500, thanks @rdp)
- 👉 Show full path of locally compiled Crystal. (#8486, thanks @rdp)
- Code cleanups. (#8460, thanks @veelenga)
Language semantics
- 🛠 Fixed method lookup priority when type alias of union is used. (#8258, thanks @asterite)
- 🛠 Fixed visibility modifiers in virtual types. (#8562, thanks @asterite)
- 🛠 Fixed
sizeof(Bool)
. (#8273, thanks @asterite)
Tools
Formatter
- 🛠 Fixed indent in arguments. (#8315, thanks @MakeNowJust)
- 🛠 Fixed crash related to parenthesis on generic types. (#8501, thanks @asterite)
Doc generator
- 🛠 Fixed underscore type restriction in doc generator. (#8331, thanks @straight-shoota)
- 📄 Correctly attach docs through multiple macro invocations. (#8502, thanks @asterite)
- 👍 Allow constants to use
:ditto:
. (#8389, thanks @Blacksmoke16) - ➕ Add sitemap generator. (#8348, thanks @straight-shoota)
- ➕ Add documentation for pseudo-methods:
!
,as
,nil?
, etc.. (#8327, #8371, thanks @straight-shoota) - ➕ Add clickable anchor icon next to headings. (#8344, thanks @Blacksmoke16)
- 👉 Use
&
instead of&block
for signature of yielding method. (#8394, thanks @j8r)
Playground
Others
- 👍 Allow boolean negation to be written also as a regular method call
-
v0.31.1 Changes
September 30, 2019 -
v0.31.0 Changes
September 23, 2019Language changes
Macros
Standard library
- (breaking-change) Remove
Markdown
from the std-lib. (#8115, thanks @asterite) - (breaking-change) Deprecate
OptionParser#parse!
, useOptionParser#parse
. (#8041, thanks @didactic-drunk) - 🛠 Fix example codes in multiple places. (#8194, thanks @maiha)
Numeric
- (breaking-change) Enable overflow by default. (#8170, thanks @bcardiff)
- (breaking-change) Make
/
the arithmetic division for all types. (#8120, thanks @bcardiff) - Add
BigDecimal# **
andBigRational#**
(pow operator). (#7860, thanks @jwbuiter) - 👻 Avoid overflow exception in
Number#round(digits, base)
. (#8204, thanks @bcardiff) - 🔨 Refactor
Int#divisible_by?
for clarity. (#8045, thanks @yxhuvud)
Text
- 🐎 (performance) Minor
String#lchop?
ASCII-only optimization. (#8052, thanks @r00ster91)
Collections
- 🐎 (performance) Array optimizations for small number of elements. (#8048, thanks @asterite)
- 🐎 (performance) Optimize
Array#*
. (#8087, thanks @asterite) - 🐎 (performance) Hash now uses an open addressing algorithm. (#8017, #8182, thanks @asterite)
- 🐎 (performance) Optimize
Hash#to_a
,Hash#keys
andHash#values
. (#8042, thanks @asterite) - 🐎 (performance) Add
Hash#put
and optimizeSet#add?
. (#8116, thanks @asterite) - 🛠 Fixed
Slice#==
for some generic instantiations, addSlice#<=>
. (#8074, thanks @asterite) - ➕ Add docs on idempotence and methods involving eager evaluation in
Iterator
. (#8053, thanks @KimBurgess) - ➕ Add
Set#+
. (#8121, thanks @sam0x17) - 🔨 Refactor
Hash
to use integer division instead of float division. (#8104, thanks @asterite)
Serialization
- (breaking-change) Rename
XML::Type
toXML::Node::Type
, introduceXML::Reader::Type
. (#8134, thanks @asterite) - 🛠 Fixed JSON and YAML parsing of
NamedTuple
with nilable fields. (#8109, thanks @asterite) - 🛠 Fixed YAML to emit unicode characters as such. (#8132, thanks @asterite)
- 🛠 Fixed INI generation of empty sections. (#8106, thanks @j8r)
Files
- 🐎 (performance) Optimize
Path#join
by precomputing capacity if possible. (#8078, thanks @asterite) - 🐎 (performance) Optimize
Path#join
for the case of joining one single part. (#8082, thanks @asterite) - 🐎 (performance) Optimize
Dir.glob
. (#8081, thanks @asterite) - 🛠 Fixed
File.basename
off-by-one corner-case. (#8119, thanks @ysbaddaden) - 🛠 Fixed unneeded evaluation of
Path.home
onPath.expand
. (#8128, thanks @asterite) - 🛠 Fixed
Zip::Writer
STORED compression. (#8142, thanks @asterite) - 🛠 Fixed missing check on
ARGF
if read_count is zero. (#8177, thanks @Blacksmoke16)
Networking
- (breaking-change) Replace
HTTP::Server::Response#respond_with_error
with#respond_with_status
. (#6988, thanks @straight-shoota) - (breaking-change) Handle too long URIs and too large header fields in
HTTP::Request.from_io
and removeHTTP::Request::BadRequest
. (#8013, thanks @straight-shoota) - 🆕 Fixed memory leak from
SSL_new
ifssl_accept
fails. (#8088, thanks @rdp) - 🛠 Fixed WebSocket ipv6 hostname connection. (#8066, thanks @MrSorcus)
- ➕ Add
URI#query_params
method. (#8090, thanks @rodrigopinto) - ➕ Add
URI#resolve
andURI#relativize
. (#7716, thanks @straight-shoota) - ➕ Add
#clear
,#delete
, and#size
methods toHTTP::Cookies
. (#8107, thanks @sam0x17) - 🔨 Refactor
http/server_spec
. (#8056, thanks @straight-shoota) - 🔨 Refactor UDP specs to use random port. (#8139, thanks @waj)
Concurrency
- Multithreading. (#8112, thanks @waj)
- Delay releasing of fiber stack in multi-thread mode. (#8138, thanks @waj)
- ⏱ Make
Crystal::Scheduler.init_workers
block until workers are ready. (#8145, thanks @bcardiff) - 👉 Make
Crystal::ThreadLocalValue
thread-safe. (#8168, thanks @waj) - Let
exec_recursive
use a thread-local data structure. (#8146, thanks @asterite) - ➕ Add explicit return types for some channel methods. (#8161, thanks @Blacksmoke16)
- ✂ Remove the dedicated fiber to run the event loop. (#8173, thanks @waj)
- 🛠 Fix corruption of thread linked list. (#8196, thanks @waj)
- ↪ Workaround compile on win32 until fibers is implemented. (#8195, thanks @straight-shoota)
System
Spec
- (breaking-change) Add support for
focus
. (#8125, #8178, #8208, thanks @asterite, @straight-shoota, @bcardiff)
Compiler
- 🛠 Fixed ICE on declarations inside fun. (#8076, thanks @asterite)
- 🛠 Fixed missing
name_location
of some calls. (#8192, thanks @asterite) - ⚠ Activate compiler warnings by default. (#8171, thanks @bcardiff)
- 👌 Improve return type mismatch error. (#8203, thanks @asterite)
- 👌 Improve
for
expression error. (#7641, thanks @r00ster91)
Language semantics
- 🛠 Fixed abstract def check regarding generic ancestor lookup. (#8098, thanks @asterite)
- 🛠 Fixed missing virtualization of type arguments in
Proc
types. (#8159, thanks @asterite) - 🛠 Fixed incorrect typing after exception handler. (#8037, thanks @asterite)
- 🛠 Fixed behaviour when a yield node can't be typed. (#8101, thanks @asterite)
- 🛠 Fixed
offsetof
on reference types. (#8137, thanks @mcr431) - 👍 Allow rescue var to be closured. (#8143, thanks @asterite)
- 🔨 Refactor class var and constant initialization. (#8067, #8091, thanks @waj)
- ➕ Add runtime check for recursive initialization of class variables and constants. (#8172, thanks @waj)
Tools
Doc generator
- 🛠 Fixed link to constructors of another class. (#8110, thanks @asterite)
- 📄 Enable docs from previous def and/or ancestors to be inherited. (#6989, thanks @asterite)
Others
- (breaking-change) Remove
-
v0.30.1 Changes
August 12, 2019Standard library
Numeric
- 🛠 Fixed
Number#humanize
digits. (#8027, thanks @straight-shoota)
Networking
- 🛠 Fixed TCP socket leaking after failed SSL connect in
HTTP::Client#socket
. (#8025, thanks @straight-shoota) - Honor normalized header names for HTTP requests. (#8061, thanks @asterite)
Concurrency
- 👍 Don't resume fibers directly from event loop callbacks (or support for libevent 2.1.11). (#8058, thanks @waj)
Compiler
- 🛠 Fixed
sizeof(Nil)
and other empty types. (#8040, thanks @asterite) - ↪ Avoid internal globals of type i128 or u128. (or workaround a llvm 128 bits bug). (#8063, thanks @bcardiff, @asterite)
Language semantics
- Consider abstract method implementation in supertype for abstract method checks. (#8035, thanks @asterite)
Tools
Formatter
- 🖐 Handle consecutive macro literals when subformatting. (#8034, thanks @asterite)
- 🛠 Fixed crash when formatting syntax error inside macro. (#8055, thanks @asterite)
Others
- 🛠 Fixed
-
v0.30.0 Changes
August 01, 2019Language changes
- (breaking-change) Enforce abstract methods return types. (#7956, #7999, #8010, thanks @asterite)
- (breaking-change) Don't allow ranges to span across lines. (#7888, thanks @oprypin)
Macros
- ➕ Add
args
/named_args
macro methods toAnnotations
. (#7694, thanks @Blacksmoke16) - Unify
resolve
andtypes
macro methods API forType
andPath
for convenience. (#7970, thanks @asterite)
Standard library
- (breaking-change) Remove
UUID#to_slice
in favor ofUUID#bytes
to fix dangling pointer issues. (#7901, thanks @ysbaddaden) - 🐎 (performance) Improve
Box
of reference types. (#8016, thanks @waj) - 🛠 Fixed initial seed of
Random::ISAAC
. (#7977, thanks @asterite) - 🛠 Fixed mem intrinsics for aarch64. (#7983, thanks @drujensen)
- ➕ Add
Benchmark.memory
. (#7835, thanks @r00ster91) - 👍 Allow setting default capacity for
StringPool
. (#7899, thanks @carlhoerberg) - ➕ Add type restrictions to
INI
. (#7831, thanks @j8r) - 🛠 Fixed
Logger
docs. (#7898, thanks @dprobinson) - 🛠 Fix example codes in multiple places. (#8003, thanks @maiha)
Numeric
- 🛠 Fixed incorrect
Int#%
overflow. (#7980, thanks @asterite) - Fixed inconsistency between
Float#to_s
andBigFloat#to_s
, always show.0
for whole numbers. (#7982, thanks @Lasvad)
Text
Collections
- ➕ Add
Enumerable#tally
. (#7921, thanks @kachick) - ➕ Add
Enumerable#reduce?
overload with not initial value. (#7941, thanks @miketheman) - 🛠 Fix specs of
Enumerable#min_by?
. (#7919, thanks @kachick)
Serialization
- (breaking-change) JSON: use enums instead of symbols. (#7966, thanks @asterite)
- 🛠 Fixed YAML deserialization of String in a union type. (#7938, thanks @asterite)
- 🏗 Validate element names in
XML::Builder
. (#7965, thanks @Blacksmoke16) - 👍 Allow numeric keys in JSON (ie:
Hash(Int32, String).from_json
). (#7944, thanks @asterite) - ➕ Add
alias
/merge
methods toYAML::Builder
andYAML::Nodes::Builder
. (#7949, thanks @Blacksmoke16)
Files
- ➕ Adds
File.readlink
to matchFile.symlink
. (#7858, thanks @didactic-drunk)
Networking
- (breaking-change) Improve URL encoding.
URI.escape
andURI.unescape
are renamed toURI.encode_www_form
andURI.decode_www_form
. AddURI.encode
andURI.decode
. (#7997, #8021, thanks @straight-shoota, @bcardiff) - 🐎 (performance) HTTP protocol parsing optimizations. (#8002, #8009, thanks @asterite)
- 🛠 Fixed
HTTP::Server
response double-close. (#7908, thanks @asterite) - Enforce
HTTP::Client
host argument is just a host. (#7958, thanks @asterite) - 👍 Allow
HTTP::Params.encode
to encode an arrays of values for a key. (#7862, thanks @rodrigopinto) - ⏱ Forward
read_timeout
/write_timeout
in ssl socket to underlaying socket. (#7820, thanks @carlhoerberg) - 👍 Natively support Same-site Cookies. (#7864, thanks @Blacksmoke16)
- 👍 Allow setting buffer size for
IO::Buffered
. (#7930, thanks @carlhoerberg)
Crypto
- Require openssl algorithm in pkcs5. (#7985, thanks @will)
- 🛠 Fixed cipher expectation in
OpenSSL::SSL::Socket
spec. (#7871, thanks @j8r)
Concurrency
System
- Introduce
System::User
andSystem::Group
. (#7725, thanks @woodruffw, @chris-huxtable) - ➕ Add docs for
Process::Status.exit_status
(#7873). (#8014, thanks @UlisseMini)
Compiler
- 🛠 Fixed codegen of
pointer.as(Nil)
. (#8019, thanks @asterite) - 🛠 Fixed edge cases in parser and stringifier. (#7886, thanks @oprypin)
- 🛠 Fixed
concrete_types
for virtual metaclass and modules. (#7951, thanks @bcardiff) - 🛠 Fixed incorrect
remove_indirection
inTypeDefType
. (#7971, thanks @bcardiff) - Fixed missing
CRYSTAL_SPEC_COMPILER_FLAGS
usage in some more specs. (774768, thanks @bcardiff) - Revamp compile error formatting & output. (#7748, thanks @martimatix)
- ➕ Add support for LLVM 8. (#7987, thanks @bcardiff)
- ➕ Add support for LLVM 7. (#7986, thanks @bcardiff, @waj, @foutrelis, @wmoxam)
- ➕ Add debug log helper function for codegen. (#7935, #7937, thanks @bcardiff)
- 🔨 Refactor codegen of unions. (#7940, thanks @bcardiff)
- 🚚 Move
LLVMId
fromCodeGenVisitor
toProgram
. (#7973, thanks @bcardiff) - 🔨 Minor additions and refactors on for LLVM codegen. (#7972, thanks @bcardiff)
- ➕ Add
bin/check-compiler-flag
helper script. Addmake clean_cache
. (da3892, thanks @bcardiff)
Language semantics
- 🛠 Fixed generic metaclass argument expansion. (#7916, thanks @asterite)
- 🛠 Fixed top-level private const not being scoped. (#7907, thanks @asterite)
- 🛠 Fixed enum overflow when declaring members. (#7881, thanks @asterite)
- 🛠 Fixed annotation lookup on generic types. (#7891, thanks @asterite)
Tools
Formatter
Doc generator
- 👍 Allow rendering tags on methods without any docs. (#7952, thanks @Blacksmoke16)
Others
-
v0.29.0 Changes
June 05, 2019Standard library
Macros
- 🛠 Fix inheritance support of
record
macro. (#7811, thanks @asterite) - Omit quotes in
puts
macro output. (#7734, thanks @asterite)
Numeric
- 🐎 (performance) Optimize
String#to_u
methods for the case of a negative number. (#7446, thanks @r00ster91)
Text
- (breaking-change) Deprecate
String#at
, useString#char_at
. (#7633, thanks @j8r) - (breaking-change) Change
String#to_i
to parse octals with prefix0o
(but not0
by default). (#7691, thanks @icy-arctic-fox) - (breaking-change) Restrict some
String#to_i
arguments to beBool
. (#7436, thanks @j8r) - ➕ Add
downcase
option toString#camelcase
. (#7717, thanks @wontruefree) - ➕ Add support for unicode 12.0.0. (#7721, thanks @Blacksmoke16)
- 🛠 Fix
Unicode
not showing up in the API docs. (#7720, thanks @r00ster91)
Collections
- (breaking-change) Remove
Slice#pointer
. (#7581, thanks @Maroo-b) - ➕ Add sort methods to
Slice
. (#7597, thanks @Maroo-b) - ➕ Add
Slice#[]?
. (#7701, thanks @Sija) - 👌 Improve docs for
Slice#[]
. (#7780, thanks @Sija)
Serialization
Time
- 🛠 Fix time format RFC 3339 to not include offset seconds. (#7492, thanks @straight-shoota)
Files
- (breaking-change) Rename
File::DEVNULL
toFile::NULL
. (#7778, thanks @r00ster91) - 🛠 Fix handling of files starting with
~
inPath#expand
. (#7768, thanks @byroot) - 🛠 Fix
Dir.glob(match_hidden: false)
not hiding hidden files properly. (#7774, thanks @ayazhafiz)
Networking
- (breaking-change) Let
IO#copy
returnUInt64
. (#7660, thanks @asterite) - ➕ Add support for UDP multicast. (#7423, thanks @stakach)
- ➕ Add missing requires to
openssl.cr
. (#7803, thanks @RX14) - ➕ Add
IO::MultiWriter#flush
. (#7765, thanks @mamantoha) - ➕ Add
OpenSSL::SSL::Socket#cipher
and#tls_version
. (#7445, thanks @carlhoerberg) - 👌 Improve
URI#normalize
. (#7635, thanks @straight-shoota) - 👌 Improve documentation of some
URI
methods. (#7796, thanks @r00ster91) - 🔨 Refactor
StaticFileHandler
specs forLast-Modified
header. (#7640, thanks @straight-shoota) - 🔨 Refactor compression usage in handler specs. (#7819, thanks @asterite)
Crypto
Concurrency
Compiler
- (breaking-change) Fix require relative path resolution. (#7758, thanks @asterite)
- (breaking-change) Disallow '!' or '?' at the end of the LHS in an assignment. (#7582, thanks @Maroo-b)
- 👍 Allow running compiler_specs with specific flags. (#7837, thanks @bcardiff)
- 🛠 Fix extend from generic types. (#7812, thanks @asterite)
- Don't virtualize types in
Union(...)
and keep more accurate type information. (#7815, thanks @asterite) - 📇 Do not generate debug metadata for arguments of naked functions. (#7775, thanks @eyusupov)
- 🗄 Detect deprecation on initialize methods and methods with named args. (#7724, thanks @bcardiff)
- 🛠 Fix track of AST nodes location. (#7827, thanks @asterite)
- 🛠 Fix
offsetof
not being usable with macros. (#7703, thanks @malte-v) - 👍 Allow parsing of
call &.@ivar
. (#7754, thanks @asterite) - Fix
Def#to_s
with**options
and&block
. (#7854, thanks @MakeNowJust) - Check
pointerof
inner expression for errors. (#7755, thanks @asterite) - 🛠 Fix some error messages. (#7833, thanks @asterite)
- 👌 Improve wording of
pointerof(self)
parser error. (#7542, thanks @r00ster91) - 🛠 Fix typo. (#7828, thanks @RX14)
Language semantics
- (breaking-change) Fix new/initialize lookup regarding modules. (#7818, thanks @asterite)
- (breaking-change) Don't precompute
sizeof
on abstract structs and modules. (#7801, thanks @asterite) - Consider macro calls in
@ivar
initializer. (#7750, thanks @asterite) - Give precedence to
T.class
overClass
in method lookup. (#7759, thanks @asterite) - 0️⃣ Honor enum base type on non-default values. (#7776, thanks @asterite)
- Avoid lookup of private def defined inside macro. (#7733, thanks @asterite)
- 👌 Improve type flow of var in
if
with&&
. (#7785, thanks @asterite) - 🛠 Fix handling of
NoReturn
inif
. (#7792, thanks @asterite) - 👌 Improve edge issues with
while
andrescue
. (#7806, thanks @asterite) - 👌 Improve error on macro call in proc pointer. (#7757, thanks @asterite)
- 🛠 Fix error on named args forwarding. (#7756, thanks @asterite)
- Check
NoReturn
type in named args. (#7761, thanks @asterite) - 🛠 Fix internal handling of unbound/abstract generic types. (#7781, thanks @asterite)
- 🛠 Fix wrong cast to unbound generic type. (#7793, thanks @asterite)
- 🛠 Fix subclass observer to handle edge case call over generic types. (#7735, thanks @asterite)
- 🛠 Fix edge case of abstract struct with one subclass. (#7787, thanks @asterite)
- 👉 Make automatic cast work with
with ... yield
. (#7746, thanks @asterite)
Tools
- 👍 Allow to lookup class and module implementations. (#7742, thanks @MakeNowJust)
- 🔨 Refactor old duplicated 'def contains_target'. (#7739, thanks @MakeNowJust)
Formatter
- Don't produce unnecessary newline before named args following heredoc. (#7695, thanks @MakeNowJust)
- 🛠 Fix formatting of multiline call arguments. (#7745, thanks @MakeNowJust)
- 🛠 Fix formatting of annotations with newlines and spaces. (#7744, thanks @MakeNowJust)
- 🔨 Refactor code to format &.[]. (#7699, thanks @MakeNowJust)
Others
- 🛠 Fix inheritance support of
-
v0.28.0 Changes
April 17, 2019Language changes
- (breaking-change) Enum declaration members can no longer be separated by a space, only by a newline,
;
or,
, the latter being deprecated and reformatted to a newline. (#7607, #7618, thanks @asterite, and @j8r) - ➕ Add begin-less and end-less ranges:
array[5..]
. (#7179, thanks @asterite) - ➕ Add
offsetof(Type, @ivar)
expression. (#7589, thanks @malte-v)
Macros
- ➕ Add
Type#annotations
to list all annotations and not just the last of each kind. (#7326, thanks @Blacksmoke16) - ➕ Add
ArrayLiteral#sort_by
macro method. (#3947, thanks @jreinert)
Standard library
- (breaking-change) Allow creating
None
enum flag withEnum.from_value
. (#6516, thanks @bew) - (breaking-change) Add deprecation message to
PartialComparable
. Its behaviour has been fully integrated intoComparable
. (#7664, thanks @straight-shoota) - 🐎 (performance) Optimize dwarf line numbers decoding. (#7413, thanks @asterite)
- 🛠 Fix
Signal::CHLD.reset
not clearing previous handler. (#7409, thanks @asterite) - ➕ Add lazy versions of
Object.getter?
andObject.property?
macros. (#7322, thanks @Sija) - 👍 Allow returning other values than
-1
,0
and1
byComparable#<=>
. (#7277, thanks @r00ster91) - ➕ Add missing
require
statements to samples in the API docs. (#7564, thanks @Maroo-b) - 🛠 Fix example codes in multiple places. (#7569, thanks @maiha)
- ➕ Add documentation for
@[Flags]
and@[Link]
annotations. (#7665, thanks @bcardiff) - ➕ Add documentation for
Bool
. (#7651, thanks @wontruefree) - 🔨 Refactor to avoid usage of the thread-local
$errno
GLIBC_PRIVATE symbol. (#7496, thanks @felixvf) - 🔨 Refactor to have similar signatures accross the stdlib for
#to_s
and#inspect
. (#7528, thanks @wontruefree)
Numeric
- (breaking-change) Add deprecation message to
Int#/
. It will return aFloat
in0.29.0
. UseInt#//
for integer division. (#7639, thanks @bcardiff) - 🔄 Change
Number#inspect
to not show the type suffixes. (#7525, thanks @asterite) - Add
Int#leading_zeros_count
andInt#trailing_zeros_count
. (#7520, thanks @Sija) - ➕ Add
Big*#//
,BigInt#&
-ops and missing#floor
,#ceil
,#trunc
. (#7638, thanks @bcardiff) - 👌 Improve
OverflowError
message. (#7375, thanks @r00ster91)
Text
- 🐎 (performance) Optimize
String#compare
in case of ASCII only. (#7352, thanks @r00ster91) - ➕ Add methods for human-readable formatting of numbers:
Number#format
,Number#humanize
, andInt#humanize_bytes
. (#6314, thanks @straight-shoota) - ➕ Add
String#rchop?
andString#lchop?
. (#7328, thanks @j8r) - ➕ Add
options
argument toString#camelcase
andString#underscore
. (#7374, thanks @r00ster91) - ➕ Add docs to
Unicode::CaseOptions
. (#7513, thanks @r00ster91) - Improve specs and docs for
String#each_line
andIO#each_line
. (#7419, thanks @straight-shoota)
Collections
- (breaking-change) Let
Array#sort
only use<=>
, and let<=>
returnnil
for partial comparability. (#6611, thanks @asterite) - (breaking-change) Drop
Iterator#rewind
. Implement#cycle
by storing elements in an array. (#7440, thanks @asterite) - 🐎 (performance) Add
Enumerable#each_cons
support forDeque
as a reuse buffer. (#7233, thanks @yxhuvud) - 🐎 (performance) Change
Range#bsearch
/ 2
to>> 1
for faster performance. (#7531, thanks @Fryguy) - 🛠 Fix
Slice#clone
for non-primitive types and deep copy. (#7591, thanks @straight-shoota) - 🚚 Move
Indexable#zip
andIndexable#zip?
toEnumerable
and make it work with any number ofIndexable
orIterable
orIterator
. (#7453, thanks @asterite) - ➕ Add
Slice#[](Range)
. (#7439, thanks @asterite) - ➕ Add nillable range fetching
#[]?(Range)
toArray
andString
. (#7338, thanks @j8r) - ➕ Add
Set#add?
. (#7495, thanks @Sija) - 👌 Improve documentation of
Hash
regarding ordering of items. (#7594, thanks @straight-shoota)
Serialization
- (breaking-change) Change return type of
YAML#libyaml_version
toSemanticVersion
. (#7555, thanks @asterite) - 🛠 Fix support for libxml2 2.9.9. (#7477, thanks @asterite)
- 🛠 Fix support for libyaml 0.2.2. (#7555, thanks @asterite)
- ➕ Add
BigDecimal.from_yaml
. (#7398, thanks @Sija)
Time
- (breaking-change) Rename
Time
constructors. DeprecateTime.now
to encourage usageTime.utc
orTime.local
(#5346, #7586, thanks @straight-shoota) - (breaking-change) Rename
Time#add_span
toTime#shift
for changing a time instance by calendar units and handle other units. (#6598, thanks @straight-shoota) - (breaking-change) Change
Time#date
to return aTuple
of{year, month, day}
. UseTime#at_beginning_of_day
if aTime
instance is wanted. (#5822, thanks @straight-shoota) - 🛠 Fix Windows monotonic time bug. (#7377, thanks @domgetter)
- 🔨 Refactor
Time
methods. (#6581, thanks @straight-shoota)
Files
- (breaking-change) Remove
IO#flush_on_newline
and onlysync
onSTDOUT
/STDIN
/STDERR
when they are TTY devices. (#7470, thanks @asterite) - ➕ Add
Path
type. (#5635, thanks @straight-shoota)
Networking
(breaking-change) Move
HTTP::Multipart
toMIME::Multipart
. (#7085, thanks @m1lt0n)(breaking-change) Stop parsing JSON in OAuth2 errors. (#7467, thanks @asterite)
(breaking-change) Fix
RequestProcessor
connection reuse logic. (#7055, thanks @straight-shoota)(breaking-change) Replace
HTTP.default_status_message_for(Int)
withHTTP::Status.new(Int).description
. (#7247, thanks @dwightwatson)(breaking-change) Fix issues in
URI
implementation.URI#opaque
method is merged intoURI#path
, which no longer returnsNil
.#parse
/#to_s
normalization and default port handling has changed. (#6323, thanks @straight-shoota)🛠 Fix write buffering in OpenSSL sockets. (#7460, thanks @carlhoerberg)
🛠 Fix leaks in
HTTP::Server
#bind_*
and specs. (#7197, thanks @straight-shoota)➕ Add
HTTP::Request#remote_address
. (#7610, thanks @asterite)➕ Add
HTTP::Status
andResponse#status
. (#7247, #7682, thanks @dwightwatson, and @bcardiff)➕ Add support for OAuth 2.0 resource owner password credentials grant type. (#7424, thanks @Blacksmoke16)
➕ Add support for IIS date format in cookies. (#7405, thanks @Sija)
Allow calls to
IO::Syscall#wait_readable
andIO::Syscall#wait_writable
. (#7366, thanks @stakach)🛠 Fix spec of
HTTP::Client
to not write server response after timeout. (#7402, thanks @asterite)🛠 Fix spec of
TCP::Server
for musl. (#7484, thanks @straight-shoota)Crypto
- (breaking-change) Use
OpenSSL::Algorithm
instead of symbols fordigest
/hexdigest
. Expose LibCrypt'sPKCS5_PBKDF2_HMAC
. (#7264, thanks @mniak)
Concurrency
- ➕ Add multi-threading ready GC when compiling with
-D preview_mt
. (#7546, thanks @bcardiff, @waj, and @ysbaddaden) - 👍 Ship patched bdw-gc for multi-threading support. (#7622, thanks @bcardiff, and @ysbaddaden)
- 🔨 Refactor to extract
Fiber::StackPool
fromFiber
. (#7417, thanks @ysbaddaden) - 🔨 Refactor
IO::Syscall
asIO::Evented
. (#7505, thanks @ysbaddaden)
System
- ➕ Add command and args to
execvp
error message. (#7511, thanks @straight-shoota) - 🔨 Refactor signals handling in a separate fiber. (#7469, thanks @asterite)
Spec
- 👌 Improve how running specs are cancelled upon
CTRL+C
. (#7426, thanks @asterite) - 👍 Allow
pending
andit
to accept constants. (#7646, thanks @straight-shoota)
Compiler
- 🐎 (performance) Avoid fork and spawn when
--threads=1
. (#7397, thanks @asterite) - 🛠 Fix exception type thrown on missing require. (#7386, thanks @asterite)
- 🛠 Fix ICE when assigning a constant inside a multi-assign. (#7468, thanks @asterite)
- 🛠 Fix parsing and behaviour of
->foo.[]
and other operators . (#7334, thanks @asterite) - 🛠 Fix parsing bug in
asm
with 3 colons and a variable. (#7627, thanks @r00ster91) - 🗄 Opt-in detection of calls to
@[Deprecated]
methods. (#7596, #7626, #7661, thanks @bcardiff) - Add
CRYSTAL_LIBRARY_PATH
for lookup static libraries. (#7562, thanks @bcardiff) - 👌 Improve error messages by adding the scope (and
with ... yield
scope, if any) on undefined method error. (#7384, thanks @asterite) - Suggest
next
when trying to break from captured block . (#7406, thanks @r00ster91) - ➕ Add detection of linux environment in compiler config. (#7479, thanks @straight-shoota)
- 👍 Pending leftovers to support
//
and&
-ops in multiple places. (#7628, thanks @bcardiff) - 🔨 Refactor
Crystal::Config.version
to useread_file
macro. (#7081, thanks @Sija) - Rewrite macro spec without executing a shell command. (#6962, thanks @asterite)
- 🛠 Fix typo in internals. (#7592, thanks @toshokan)
Language semantics
- 🛠 Fix issues with
as
,as?
and unions and empty types. (#7475, thanks @asterite) - 🛠 Fix method lookup when restrictions of instantiated and non-instantiated generic types are used. (#7537, thanks @bew)
- 🛠 Fix method lookup when free vars and explicit types are used. (#7536, #7580, thanks @bew)
- When declaring a
protected initialize
, define a protectednew
. (#7510, thanks @asterite) - 🛠 Fix named args type matching. (#7529, thanks @asterite)
- 🔀 Merge procs with the same arguments type and
Nil | T
return type toNil
return type. (#7527, thanks @asterite) - 🛠 Fix passing recursive alias to proc. (#7568, thanks @asterite)
Tools
Formatter
- 🛠 Fix formatting of
1\n.as(Int32)
. (#7347, thanks @asterite) - 🛠 Fix formatting of nested array elements. (#7450, thanks @MakeNowJust)
- 🛠 Fix formatting of comments and enums. (#7605, thanks @asterite)
- 🛠 Fix CLI handling of absolute paths input. (#7560, thanks @RX14)
Doc generator
- Don't include private constants. (#7575, thanks @r00ster91)
- Include Crystal built-in constants. (#7623, thanks @bcardiff)
- ➕ Add compile-time flag to docs generator. (#6668, #7438, thanks @straight-shoota)
- 🗄 Display deprecated label when
@[Deprecated]
is used. (#7653, thanks @bcardiff)
Playground
Others
- CI improvements and housekeeping. (#7359, #7381, #7388, #7387, #7390, #7622, thanks @bcardiff)
- 🐧 Smoke test linux 64 bits package using docker image recent build. (#7389, thanks @bcardiff)
- Mention git pre-commit hook in
CONTRIBUTING.md
. (#7617, thanks @straight-shoota) - 🛠 Fix misspellings throughout the codebase. (#7361, thanks @Sija)
- 👉 Use chars instead of strings throughout the codebase. (#6237, thanks @r00ster91)
- 🛠 Fix GC finalization warning in
Thread
specs. (#7403, thanks @asterite) - ✂ Remove generated docs from linux packages. (#7519, thanks @straight-shoota)
- (breaking-change) Enum declaration members can no longer be separated by a space, only by a newline,