crystal v0.19.0 Release Notes
Release Date: 2016-09-02 // over 7 years ago-
- (breaking change) Added
select
keyword - (breaking change) Removed $global variables. Use @@class variables instead.
- (breaking change) Heredoc now ends when the matching identifier is found, either followed by a space or by a non-identifier
- (breaking change) Assignment to a local variable inside an assignment to that same variable is now an error
- (breaking change) Type names like
T
,T1
,U
, etc., are now disallowed at the top level, to avoid conflicts with free variables - (breaking change) Type lookup (
Foo::Bar::Baz
) had some incorrect behaviour that now is fixed. This can break existing code that relied on this incorrect behaviour. The fix is to fully qualify types (::Foo::Bar::Baz
) - (breaking change) In relationships like
class Bar < Foo(Baz)
andinclude Moo(Baz)
, all ofFoo
,Moo
andBaz
must be defined before that point (this was not always the case in previous versions) - (breaking change) Removed the deprecated syntax
x as T
- (breaking change) Removed block form of
String#match
- (breaking change) Removed
IO#read_nonblock
- (breaking change)
Int#/
now performs floored division. UseInt#tdiv
for truncated division (see their docs to learn the difference) - โ Added support for LLVM 3.8 (thanks @omarroth)
||
now does type filtering- Generic inheritance should now work well, and (instantiated) generic modules can now be used as the type of instance variables
NamedTuple
can now be accessed with strings too (thanks @jhass)Base64
can now encode and decode directly to anIO
(thanks @kostya)BigInt
now uses GMP implementation of gcd and lcm (thanks @endSly)- ๐
ECR
now supports removing leading and trailing whitespace (<%-
,-%>
) HTTP::Request#path
now never returnsnil
: it fallbacks to"/"
(thanks @jhass)String#tr(..., "")
is now the same asString#delete
- ๐
tool hierarchy
now supports--format json
(thanks @bmulvihill) - โ Added
Char#ascii?
- โ Added
Class#nilable?
andUnion#nilable?
- โ Added
Hash#has_value?
(thanks @kachick) - โ Added
IO::Sized
andIO::Delimited
(thanks @RX14) - โ Added
IO::Hexdump
(thanks @ysbaddaden) - โ Added
IO#noecho
andIO#noecho!
(thanks @jhass) - โ Added
Logger.new(nil)
to create a null logger - ๐ Added
OptionParser#missing_option
andOptionParser#invalid_option
(thanks @jhass) - โ Added
Process.exists?
,Process#exists?
andProcess#terminated?
(thanks @jhass) - โ Added
Process.exec
(thanks @jhass) - Added
Slice#copy_to
,Slice#copy_from
,Slice#move_to
andSlice#move_from
(thanks @RX14) - โ Added
URI#==
andURI#hash
(thanks @timcraft) - โ Added
YAML#parse(IO)
- โ Added
Indexable
module thatArray
,Slice
,Tuple
andStaticArray
include - Added
indent
parameter toto_pretty_json
- โ Added lazy form of
getter
andproperty
macros - โ Added macro methods to access an ASTNode's location
- Unified String and Char to integer/float conversion API (thanks @jhass)
- ๐ Lots of bug fixes
- (breaking change) Added