crystal v0.20.0 Release Notes
Release Date: 2016-11-22 // over 7 years ago-
- (breaking change) Removed
ifdef
from the language - (breaking change) Removed
PointerIO
- (breaking change) The
body
property ofHTTP::Request
is now anIO?
(previously it wasString
). Userequest.body.try(&.gets_to_end)
if you need the entire body as a String. - (breaking change)
MemoryIO
has been renamed toIO::Memory
. The old name can still be used but will produce a compile-time warning.MemoryIO
will be removed immediately after 0.20.0. - (breaking change)
Char#digit?
was split intoChar#ascii_number?
andChar#number?
. The old name is still available and will produce a compile-time warning, but will be removed immediately after 0.20.0. - (breaking change)
Char#alpha?
was split intoChar#ascii_letter?
andChar#letter?
. The old name is still available and will produce a compile-time warning, but will be removed immediately after 0.20.0. - (breaking change) The
Iterable
module is now generic - Many
String
andChar
methods are now unicode-aware, for exampleString#downcase
,String#upcase
,Char#downcase
,Char#upcase
,Char#whitespace?
, etc. - ➕ Added support for HTTP client and server streaming.
- ➕ Added support for ARM (thanks @ysbaddaden)
- ➕ Added support for AArch64 (thanks @ysbaddaden)
- ➕ Added support for LLVM 3.9 (thanks @ysbaddaden)
- Added
__END_LINE__
magic constant in method default arguments: will be the last line of a call (if the call has a block, it will be the last line of that block) - ➕ Added
@def
inside macros that takes the value of the current method - 💅 API docs have a nicer style now, and notes like TODO and DEPRECATED are better highlighted (thanks @samueleaton)
- 👍 Slight improvement to debugging support (thanks @ggiraldez)
- 🐧 Line numbers in backtraces (linux only for now) (thanks @ysbaddaden)
- ➕ Added iteration times to
Benchmark.ips
(thanks @RX14) - 👍 Allow
HTTP::Client
block initializer to be used when passing an URI (thanks @philnash) JSON.mapping
andYAML.mapping
getter/setter generation can now be controlled (thanks @zatherz)Time
is now serializable to JSON and YAML using ISO 8601 date-time format- ➕ Added
IO::MultiWriter
(thanks @RX14) - ➕ Added
String#index(Regex)
andString#rindex(Regex)
(thanks @zatherz) - ➕ Added
String#partition
andString#rpartition
(thanks @johnjansen) - Added
FileUtils.cd
,FileUtils.mkdir
,FileUtils.mkdir_p
,FileUtils.mv
,FileUtils.pwd
,FileUtils.rm
,FileUtils.rm_r
,FileUtils.rmdir
(thanks @ghivert) - ➕ Added
JSON::Builder#raw_field
(thanks @kostya) - ➕ Added
Enumerable#chunks
andIterator#chunk
(thanks @kostya) - ➕ Added
Iterator#with_index
- Several enhancements to the Random module: now works for any integer type and avoids overflows (thanks @BlaXpirit)
- ⚡️ Optimized
Array#sort
by using introsort (thanks @c910335) - 🛠 Several bug fixes
- (breaking change) Removed