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) and include Moo(Baz), all of Foo, Moo and Baz 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. Use Int#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 an IO (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 returns nil: it fallbacks to "/" (thanks @jhass)
    • String#tr(..., "") is now the same as String#delete
    • ๐Ÿ‘ tool hierarchy now supports --format json (thanks @bmulvihill)
    • โž• Added Char#ascii?
    • โž• Added Class#nilable? and Union#nilable?
    • โž• Added Hash#has_value? (thanks @kachick)
    • โž• Added IO::Sized and IO::Delimited (thanks @RX14)
    • โž• Added IO::Hexdump (thanks @ysbaddaden)
    • โž• Added IO#noecho and IO#noecho! (thanks @jhass)
    • โž• Added Logger.new(nil) to create a null logger
    • ๐Ÿ“œ Added OptionParser#missing_option and OptionParser#invalid_option (thanks @jhass)
    • โž• Added Process.exists?, Process#exists? and Process#terminated? (thanks @jhass)
    • โž• Added Process.exec (thanks @jhass)
    • Added Slice#copy_to, Slice#copy_from, Slice#move_to and Slice#move_from (thanks @RX14)
    • โž• Added URI#== and URI#hash (thanks @timcraft)
    • โž• Added YAML#parse(IO)
    • โž• Added Indexable module that Array, Slice, Tuple and StaticArray include
    • Added indent parameter to to_pretty_json
    • โž• Added lazy form of getter and property 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