Skip to content

0.26.0

Compare
Choose a tag to compare
@bcardiff bcardiff released this 13 Aug 20:08
· 5239 commits to master since this release
eeb53c5

Language changes

  • (breaking-change) Revert do not collapse unions for sibling types. (#6351, thanks @asterite)
  • (breaking-change) Constant lookup context in macro is now lexical. (#5354, thanks @makenowjust)
  • (breaking-change) Evaluate instance var initializers at the metaclass level (ie: disallow using self). (#6414, thanks @asterite)
  • (breaking-change) Add // operator parsing. NB: No behaviour is assigned to this operator yet. (#6470, thanks @bcardiff)
  • Add &+ &- &* &** operators parsing. NB: No behaviour is assigned to these operators yet. (#6329, thanks @bcardiff)
  • Add support for empty case without when. (#6367, thanks @straight-shoota)

Macros

Standard library

Numeric

Text

Collections

Serialization

  • (breaking-change) Add a maximum nesting level to prevent stack overflow on YAML::Builder and JSON::Builder. (#6322, thanks @asterite)
  • Fixed compatibility for libyaml 0.2.1 regarding document end marker .... (#6287, thanks @straight-shoota)
  • Add methods and options for pull parsing or hybrid parsing to XML::Reader. (#5740, #6332, thanks @felixbuenemann)
  • Fixed docs for JSON::Any, JSON::Serialization and YAML::Serialization. (#6460, #6491, thanks @delef, @bmulvihill)

Time

Files

  • (breaking-change) Remove File.each_line method that returns an iterator. Use IO#each_line. (#6301, thanks @asterite)
  • Fixed File.join when path separator is a component argument. (#6328, thanks @icyleaf)
  • Fixed Dir.glob can now list broken symlinks. (#6466, thanks @straight-shoota)
  • Add File and Dir support for Windows. (#5623, thanks @RX14)

Networking

  • (breaking-change) Drop HTTP::Server#tls in favor of HTTP::Server#bind_ssl. (#5960, thanks @straight-shoota)
  • (breaking-change) Rename alias HTTP::Handler::Proc to HTTP::Handler::HandlerProc. (#6453, thanks @jwoertink)
  • Fixed Socket#accept? base implementation. (#6277, thanks @ysbaddaden)
  • Fixed performance issue due to unbuffered IO read. IO#sync only affect writes, introduce IO#read_buffering?. (#6304, #6474, thanks @asterite, @bcardiff)
  • Fixed handling of closed state in HTTP::Server::Response. (#6477, thanks @straight-shoota)
  • Fixed change encoding name comparison to be case insensitive for UTF-8. (#6355, thanks @asterite)
  • Fixed support for quoted charset value in HTTP. (#6354, thanks @asterite)
  • Fixed docs regarding udp example on Socket::Addrinfo. (#6388, thanks @faustinoaq)
  • Fixed HTTP::Client will set connection: close header on one-shot requests. (#6410, thanks @asterite)
  • Fixed OpenSSL::Digest for multibyte strings. (#6471, thanks @RX14)
  • Fixed missing Host header when using HTTP::Client#exec. (#6481, thanks @straight-shoota)
  • Add HTTP::Server#bind(URI|String) that infers protocol from scheme. (#6500, thanks @straight-shoota)
  • Add HTTP::Params.new and HTTP::Params#empty?. (#6241, thanks @icyleaf)
  • Add support for multiple Etags in If-None-Match header for HTTP::Request and HTTP::StaticFileHandler. (#6219, thanks @straight-shoota)
  • Add IDNs normalization to punycode in OpenSSL::SSL::Socket. (#6306, thanks @paulkass)
  • Add application/wasm to the default MIME types of HTTP::StaticFileHandler. (#6377, thanks @makenowjust)
  • Add URI#absolute? and URI#relative?. (#6311, thanks @mamantoha)

Crypto

Concurrency

  • Fixed Atomic#swap with reference types. (#6428, thanks @exilor)

System

Spec

Compiler

  • Fixed named arguments expansion from double splat clash with local variable names. (#6378, thanks @asterite)
  • Fixed auto assigned ivars arguments expansions when clash with keywords. (#6379, thanks @asterite)
  • Fixed resulting type of union of tuple metaclasses. (#6342, thanks @asterite)
  • Fixed ICE when using unbound type parameter inside generic type. (#6292, thanks @asterite)
  • Fixed ICE when using unions of metaclasses. (#6307, thanks @asterite)
  • Fixed ICE related to literal type guessing and generic types hierarchy. (#6341, thanks @asterite)
  • Fixed ICE related to not and inlinable values. (#6452, thanks @asterite)
  • Fixed rebind variables type in while condition after analyzing its body. (#6295, thanks @asterite)
  • Fixed corner cases regarding automatic casts and method instantiation. (#6284, thanks @asterite)
  • Fixed parsing of \A (and others) inside %r{...} inside macros. (#6282, thanks @asterite)
  • Fixed parsing of of named tuple inside generic type arguments. (#6413, thanks @asterite)
  • Fixed disallow cast from module class to virtual metaclass. (#6320, thanks @asterite)
  • Fixed disallow return inside a constant's value. (#6347, thanks @asterite)
  • Fixed debug info for closured self. (#6346, thanks @asterite)
  • Fixed parsing error of newline before closing macro. (#6382, thanks @asterite)
  • Fixed missing error if constant has NoReturn type. (#6411, thanks @asterite)
  • Fixed give proper error when doing sizeof uninstantiated generic type. (#6418, thanks @asterite)
  • Fixed private aliases at top-level are now considered private. (#6432, thanks @asterite)
  • Fixed setters with multiple arguments as now disallowed. (#6324, thanks @maxfierke)
  • Fixed type var that resolves to number in restriction didn't work. (#6504, thanks @asterite)
  • Add support for class variables in generic classes. (#6348, thanks @asterite)
  • Add support for exception handling in Windows (SEH). (#6419, thanks @RX14)
  • Refactor codegen of binary operators. (#6330, thanks @bcardiff)
  • Refactor use JSON::Serializable instead of JSON.mapping. (#6308, thanks @kostya)
  • Refactor Crystal::Call#check_visibility and extract type methods. (#6484, thanks @asterite, @bcardiff)
  • Change how metaclasses are shown. Use Foo.class instead of Foo:Class. (#6439, thanks @RX14)

Tools

Formatter

  • Fixed formatting of { {1}.foo, ...} like expressions. (#6300, thanks @asterite)
  • Fixed formatting of when with numbers. Use right alignment only if all are number literals. (#6392, thanks @makenowjust)
  • Fixed formatting of comment in case's else. (#6393, thanks @makenowjust)
  • Fixed code fence when language is not crystal will not be formatted. (#6424, thanks @asterite)

Doc generator

  • Add line numbers at link when there are duplicated filenames in "Defined in:" section. (#6280, #6489, thanks @r00ster91)
  • Fix docs navigator not scrolling into open type on page load. (#6420, thanks @soanvig)

Others