Skip to content

Releases: crystal-lang/crystal

0.30.0

01 Aug 19:37
cbf651a
Compare
Choose a tag to compare

Language changes

Macros

  • Add args/named_args macro methods to Annotations. (#7694, thanks @Blacksmoke16)
  • Unify resolve and types macro methods API for Type and Path for convenience. (#7970, thanks @asterite)

Standard library

Numeric

  • Fixed incorrect Int#% overflow. (#7980, thanks @asterite)
  • Fixed inconsistency between Float#to_s and BigFloat#to_s, always show .0 for whole numbers. (#7982, thanks @Lasvad)

Text

  • Fixed unicode alternate ranges generation. (#7924, thanks @asterite)

Collections

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 to YAML::Builder and YAML::Nodes::Builder. (#7949, thanks @Blacksmoke16)

Files

Networking

Crypto

  • Require openssl algorithm in pkcs5. (#7985, thanks @will)
  • Fixed cipher expectation in OpenSSL::SSL::Socket spec. (#7871, thanks @j8r)

Concurrency

  • Fixed sysconf call on OpenBSD. (#7879, thanks @jcs)

System

Compiler

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

Others

0.29.0

05 Jun 22:29
fbfe8b6
Compare
Choose a tag to compare

Standard library

  • Fix example codes in multiple places. (#7718, thanks @maiha)

Macros

Numeric

  • (performance) Optimize String#to_u methods for the case of a negative number. (#7446, thanks @r00ster91)

Text

  • (breaking-change) Deprecate String#at, use String#char_at. (#7633, thanks @j8r)
  • (breaking-change) Change String#to_i to parse octals with prefix 0o (but not 0 by default). (#7691, thanks @icy-arctic-fox)
  • (breaking-change) Restrict some String#to_i arguments to be Bool. (#7436, thanks @j8r)
  • Add downcase option to String#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

Serialization

Time

Files

  • (breaking-change) Rename File::DEVNULL to File::NULL. (#7778, thanks @r00ster91)
  • Fix handling of files starting with ~ in Path#expand. (#7768, thanks @byroot)
  • Fix Dir.glob(match_hidden: false) not hiding hidden files properly. (#7774, thanks @ayazhafiz)

Networking

Crypto

  • (breaking-change) Rename Crypto::Bcrypt::Password#== to #verify. (#7790, thanks @asterite)

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 over Class in method lookup. (#7759, thanks @asterite)
  • 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 in if. (#7792, thanks @asterite)
  • Improve edge issues with while and rescue. (#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

Formatter

Others

0.28.0

17 Apr 20:21
639e476
Compare
Choose a tag to compare

Language 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 with Enum.from_value. (#6516, thanks @bew)
  • (breaking-change) Add deprecation message to PartialComparable. Its behaviour has been fully integrated into Comparable. (#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? and Object.property? macros. (#7322, thanks @Sija)
  • Allow returning other values than -1, 0 and 1 by Comparable#<=>. (#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 a Float in 0.29.0. Use Int#// for integer division. (#7639, thanks @bcardiff)
  • Change Number#inspect to not show the type suffixes. (#7525, thanks @asterite)
  • Add Int#leading_zeros_count and Int#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, and Int#humanize_bytes. (#6314, thanks @straight-shoota)
  • Add String#rchop? and String#lchop?. (#7328, thanks @j8r)
  • Add options argument to String#camelcase and String#underscore. (#7374, thanks @r00ster91)
  • Add docs to Unicode::CaseOptions. (#7513, thanks @r00ster91)
  • Improve specs and docs for String#each_line and IO#each_line. (#7419, thanks @straight-shoota)

Collections

  • (breaking-change) Let Array#sort only use <=>, and let <=> return nil 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 for Deque 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 and Indexable#zip? to Enumerable and make it work with any number of Indexable or Iterable or Iterator. (#7453, thanks @asterite)
  • Add Slice#[](Range). (#7439, thanks @asterite)
  • Add nillable range fetching #[]?(Range) to Array and String. (#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 to SemanticVersion. (#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. Deprecate Time.now to encourage usage Time.utc or Time.local (#5346, #7586, thanks @straight-shoota)
  • (breaking-change) Rename Time#add_span to Time#shift for changing a time instance by calendar units and handle other units. (#6598, thanks @straight-shoota)
  • (breaking-change) Change Time#date to return a Tuple of {year, month, day}. Use Time#at_beginning_of_day if a Time 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 only sync on STDOUT/STDIN/STDERR when they are TTY devices. (#7470, thanks @asterite)
  • Add Path type. (#5635, thanks @straight-shoota)

Networking

  • (breaking-change) Move HTTP::Multipart to MIME::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) with HTTP::Status.new(Int).description. (#7247, thanks @dwightwatson)

  • (breaking-change) Fix issues in URI implementation. URI#opaque method is merged into URI#path, which no longer returns Nil. #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 and Response#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 and IO::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](...

Read more

0.27.2

05 Feb 17:12
60760a5
Compare
Choose a tag to compare

Standard library

  • Fixed integer overflow in main thread stack base detection. (#7373, thanks @ysbaddaden)

Networking

  • Fixes TLS exception during shutdown. (#7372, thanks @bcardiff)
  • Fixed HTTP::Client support exception on missing Content-Type. (#7371, thanks @bew)

0.27.1

01 Feb 16:01
64137d0
Compare
Choose a tag to compare

Language changes

Standard library

Macros

Numeric

  • Fixed scale issues when dividing BigDecimal. (#7218, thanks @Sija)
  • Allow underscores in the String passed to Big* constructors. (#7107, thanks @Sija)
  • Add conversion methods and docs to Complex. (#5440, thanks @Sija)
  • Add specs for Int128, UInt128. (#7173, thanks @bcardiff)
  • Add unsafe number ops value.to_X!/T.new!/Int#&**. (#7226, thanks @bcardiff)
  • Add overflow detection with preview opt-in. (#7206, thanks @bcardiff)

Text

Collections

Serialization

Time

  • Fixed Time::Span initializer and sleep for big seconds. (#7221, thanks @asterite)
  • Fixed docs to show proper use of parse. (#7035, thanks @jwoertink)
  • Add missing Float#weeks method similar to Int#weeks. (#7165, thanks @vlazar)

Files

Networking

Crypto

System

  • Fixed inline ASM when compiling for ARM. (#7041, thanks @omarroth)
  • Implement Crystal::System for Win32. (#6972, thanks @markrjr)
  • Add Errno#errno_message getter. (#6702, thanks @r00ster91)

Spec

Compiler

  • Fixed how LLVM::Type.const_int emit Int128 literals. (#7135, thanks @bcardiff)
  • Fixed ICE related to named tuples. (#7163, thanks @asterite)
  • Fixed automatic casting for private top-level methods. (#7310, thanks @asterite)
  • Give proper error if defining initialize inside enum, allow Enum.new. (#7266, thanks @asterite)
  • Give proper error when trying to access instance variable of union type. (#7194, thanks @asterite)
  • Give proper error when trying to instantiate Module. (#6735, thanks @r00ster91)
  • Give proper error related to named arguments. (#7288, thanks @asterite)
  • Parse required comma between block args. (#7343, thanks @asterite)
  • Improve inference in recursion that involves blocks. (#7161, thanks @asterite)
  • Add locations to all expanded macro arguments. (#7008, thanks @makenowjust)
  • Turn a not compiler specific error while requiring into ICE. (#7208, thanks @makenowjust)
  • Remove old nil? error on pointer types. (#7180, thanks @asterite)
  • Improve too big tuple and named tuple error message. (#7131, thanks @r...
Read more

0.27.0

02 Nov 16:55
c9d1eef
Compare
Choose a tag to compare

Language changes

  • (breaking-change) Disallow comma after newline in argument list. (#6514, thanks @asterite)

Macros

  • Add Generic#resolve and Generic#resolve? macro methods. (#6617, thanks @asterite)

Standard library

  • Fixed v1, v2, v3, v4, v5 methods of UUID. (#6952, thanks @r00ster91)
  • Fixed multiple docs typos and phrasing in multiple places. (#6778, #6963, thanks @r00ster91)
  • Fixes Pointer/UInt subtraction. (#6994, thanks @damaxwell)
  • Add stack overflow detection. (#6928, #6995, thanks @damaxwell)
  • Add caller file and line to Nil#not_nil!. (#6712, thanks @yeeunmariakim)
  • Restrict Enum#parse/Enum#parse? to String arguments. (#6654, thanks @vladfaust)
  • Refactor and unify printing exceptions from within fibers. (#6594, thanks @Sija)
  • Improve docs on properties generated by property?. (#6682, thanks @epergo)
  • Add docs to top level namespace constants. (#6971, thanks @r00ster91)

Macros

  • Fix typos in StringLiteral#gsub and #tr errors. (#6925, thanks @r00ster91)

Numeric

  • (breaking-change) Disallow rand with zero value. (#6686, thanks @oprypin)
  • (breaking-change) Let == and != compare the values instead of bits when dealing with signed vs unsigned integers. (#6689, thanks @asterite)
  • Fixed Int#downto with unsigned int. (#6678, thanks @gmarcais)
  • Add wrapping arithmetics operators &+ &- &*. (#6890, thanks @bcardiff)
  • Add floor divisions operator Int#// and Float#//. (#6891, thanks @bcardiff)
  • Add random support for BigInt. (#6687, thanks @oprypin)
  • Add docs related to Float::Printer::*. (#5438, thanks @Sija)

Text

  • Add String::Builder#chomp! returns self. (#6583, thanks @Sija)
  • Add :default to colorize and document ColorRGB, Color256. (#6427, thanks @r00ster91)
  • Add String::Formatter support for c flag and improve docs. (#6758, thanks @r00ster91)

Collections

  • (breaking-change) Replace Indexable#at with #fetch. Remove Hash#fetch(key) as alias of Hash#[]. (#6296, thanks @AlexWayfer)
  • Add Hash/Indexable#dig/dig?. (#6719, thanks @Sija)
  • Add Iterator.chain to chain array of iterators. (#6570, thanks @xqyww123)
  • Add NamedTuple#to_h over empty tuples. (#6628, thanks @icyleaf)
  • Optimize Indexable#join when all elements are strings. (#6635, thanks @asterite)
  • Optimize Array#skip. (#6946, thanks @asterite)

Serialization

  • Fixed YAML::Schema::FailSafe.parse and parse_all. (#6790, thanks @r00ster91)
  • Fixed order of xmlns and prefix in XML::Builder#namespace. (#6743, thanks @yeeunmariakim)
  • Fixed CSV.build quoting of Char and Symbol. (#6904, thanks @maiha)
  • Fixed docs for JSON::Serializable. (#6950, thanks @Heaven31415)
  • Add XML::Attributes#delete. (#6910, thanks @joenas)
  • Add ability to quote values always in CSV.build. (#6723, thanks @maiha)
  • Refactor how empty properties are handled in JSON::Serializable and YAML::Serializable. (#6539, thanks @r00ster91)

Time

Files

  • (breaking-change) Remove Tempfile. Use File.tempfile or File.tempname. (#6485, thanks @straight-shoota)
  • Fixed missing closed status check of FDs when creating a subprocess. (#6641, thanks @Timbus)
  • Fixed ChecksumReader.write error message. (#6889, thanks @r00ster91)
  • Add File#delete, Dir#tempdir and improve File docs. (#6485, thanks @straight-shoota)
  • Add File#fsync to flush all data written into the file to the disk device. (#6793, thanks @carlhoerberg)
  • Add DEVNULL to docs. (#6642, thanks @r00ster91)
  • Improve checks for FreeBSD version due to breaking API changes. (#6629, thanks @myfreeweb)
  • Improve performance of Zlib::Reader, Gzip::Reader and Flate::Reader by including IO::Buffered. (#6916, thanks @asterite)
  • Refactor Crystal::System::FileDescriptor to use @fd ivar directly. (#6703, thanks @straight-shoota)
  • Refactor {Zlib,Gzip,Flate}::Reader#unbuffered_rewind to use check_open. (#6958, thanks @Sija)

Networking

Crypto

Concurrency

  • Improve POSIX threads integration regarding locking, error and resource manag...
Read more

0.26.1

28 Aug 16:36
3917852
Compare
Choose a tag to compare

Language changes

  • (breaking-change) Make self to be eager evaluated when including modules. (#6557, thanks @bcardiff)

Macros

  • Add accepts_block? macro method to Def. (#6604, thanks @willhbr)

Standard library

Macros

  • Fixed Object#def_hash can receive symbols. (#6531, thanks @Sija)

Collections

  • Add Hash#transform_keys and Hash#transform_values. (#4385, thanks @deepj)

Serialization

  • Fixed JSON::Serializable and YAML::Serializable clashing with custom initializers. (#6458, thanks @kostya)

Time

Files

Networking

System

  • Improve STDIN/STDOUT/STDERR handling to avoid breaking other programs. (#6518, thanks @Timbus)

Spec

  • Fixed DotFormatter to flush after every spec. (#6562, thanks @asterite)
  • Add support for Windows. (#6497, thanks @RX14)

Compiler

  • Fixed evaluate yield expressions in macros. (#6587, thanks @asterite)
  • Fixed presence check of named argument via external name. (#6560, thanks @asterite)
  • Fixed parser error on break when. (#6509, thanks @asterite)
  • Fixed ~ methods are now able to be called as foo.~. (#6541, thanks @makenowjust)
  • Fixed parsing newline after macro control expression. (#6607, thanks @asterite)
  • Refactor use enum instead of hardcoded string values for emit kinds. (#6515, thanks @bew)

Tools

Formatter

Doc generator

  • Add Menlo font family and fix ordering. (#6602, thanks @slice)

Playground

Others

0.26.0

13 Aug 20:08
eeb53c5
Compare
Choose a tag to compare

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](https://github.com/crystal-lang/crystal/pull...
Read more

0.25.1

28 Jun 16:07
@waj waj
b782738
Compare
Choose a tag to compare

Standard library

Macros

Collections

Serialization

  • Add #dup and #clone for JSON::Any and YAML::Any. (6266, thanks @asterite)
  • Add docs example of nesting mappings to YAML.builder. (#6097, thanks @kalinon)

Time

Files

Networking

Misc

  • Fixed mmap usage on OpenBSD 6.3+. (#6250, thanks @jcs)
  • Fixed big/big_int, big/big_float, etc are now able to be included directly. (#6267, thanks @asterite)
  • Refactor dependency in Crystal::Hasher to avoid load order issues. (#6184, thanks @ysbaddaden)

Compiler

  • Fixed a leakage of unbounded generic type variable and show error. (#6128, thanks @asterite)
  • Fixed error message when lookup of library fails and lib's name contains non-alpha chars. (#6187, thanks @oprypin)
  • Fixed integer kind deduction for very large negative numbers. (#6182, thanks @rGradeStd)
  • Refactor specs tempfiles and data files usage in favor of portability (#5951, thanks @straight-shoota)
  • Improve formatting and information in some compiler error messages. (#6261, thanks @RX14)

Tools

Formatter

Doc generator

Misc

0.25.0

15 Jun 07:09
7fb783f
Compare
Choose a tag to compare

New features and breaking changes

  • (breaking-change) Time zones has been added to Time. (#5324, #5819, thanks @straight-shoota)
  • (breaking-change) Drop HTTP.rfc1123_date in favor of HTTP.format_time and add time format implementations for ISO-8601, RFC-3339, and RFC-2822. (#5123, thanks @straight-shoota)
  • (breaking-change) crystal deps is removed, use shards. (#5544, thanks @asterite)
  • (breaking-change) Hash#key was renamed as Hash#key_for. (#5444, thanks @marksiemers)
  • (breaking-change) JSON::Any and YAML::Any have been re-implemented solving some inconsistencies and avoiding the usage of recursive aliases (JSON::Type and YAML::Type have been removed). (#5183, thanks @asterite)
  • (breaking-change) Multiple heredocs can be used as arguments and methods can be invoked writing them in the initial delimiter, also empty heredocs are now supported. (#5578, #5602, #6048, thanks @asterite and @makenowjust)
  • (breaking-change) Refactor signal handlers and avoid closing pipe at exit. (#5730, thanks @ysbaddaden)
  • (breaking-change) Improve behaviour of File.join with empty path component. (#5915, thanks @straight-shoota)
  • (breaking-change) Drop Colorize#push in favor of Colorize#surround and allow nested calls across the stack. (#4196, thanks @makenowjust)
  • (breaking-change) File.stat was renamed to File.info and a more portable API was implemented. (#5584, #6161, thanks @RX14 and @bcardiff)
  • (breaking-change) Refactor HTTP::Server to bind to multiple addresses. (#5776, #5959, thanks @straight-shoota)
  • (breaking-change) Remove block argument from loop. (#6026, thanks @asterite)
  • (breaking-change) Do not collapse unions for sibling types. (#6024, thanks @asterite)
  • (breaking-change) Disallow typeof in type restrictions. (#5192, thanks @asterite)
  • (breaking-change) Perform unbuffered read when IO::Buffered#sync = true. (#5849, thanks @RX14)
  • (breaking-change) Drop when _ support. (#6150, thanks @makenowjust)
  • (breaking-change) The DivisionByZero exception was renamed to DivisionByZeroError. (#5395, thanks @sdogruyol)
  • A bootstrap windows port has been added to the standard library. It's not usable for real programs yet. (#5339, #5484, #5448, thanks @RX14)
  • Add automatic casts on literals arguments for numbers and enums. (#6074, thanks @asterite)
  • Add user defined annotations. (#6063, #6084, #6106, thanks @asterite)
  • Add macro verbatim blocks to avoid nested macros. (#6108, thanks @asterite)
  • Allow namespaced expressions to define constants eg: Foo::Bar = 1. (#5883, thanks @bew)
  • Allow trailing = in symbol literals. (#5969, thanks @straight-shoota)
  • Allow redefining None to 0 for @[Flags] enum. (#6160, thanks @bew)
  • Suggest possible solutions to failing requires. (#5487, thanks @RX14)
  • Allow pointers of external C library global variables. (#4845, thanks @larubujo)
  • Decouple pretty-printing (pp) and showing the expression (!): p, pp, p!, pp!. (#6044, thanks @asterite)
  • Add ivars default value reflection in macros. (#5974, thanks @asterite)
  • Add argless overload to Number#round to rounds to the nearest whole number. (#5397, thanks @Sija)
  • Add Int#bits_set? to easily check that certain bits are set. (#5619, thanks @RX14)
  • Add Float32 and Float64 constants. (#4787, thanks @konovod)
  • Add allocated bytes per operation in Benchmark.ips. (#5522, thanks @asterite)
  • Add String#to_utf16 and String.from_utf16. (#5541, #5579, #5583 thanks @asterite, @RX14 and @straight-shoota)
  • Add String#starts_with?(re: Regex). (#5485, thanks @makenowjust)
  • Add Regex.needs_escape?. (#5962, thanks @Sija)
  • Add Hash#last_key and Hash#last_value. (#5760, thanks @j8r)
  • Add no-copy iteration to Indexable. (#4584, thanks @cjgajard)
  • Add Time#at_{beginning,end}_of_second (#6167, thanks @straight-shoota)
  • Add IO::Stapled to combine two unidirectional IOs into a single bidirectional one. (#6017, thanks @straight-shoota)
  • Add context to errors in JSON.mapping generated code. (#5932, thanks @straight-shoota)
  • Add JSON::Serializable and YAML::Serializable attribute powered mappings. (#6082, thanks @kostya)
  • Add mode param to File.write. (#5754, thanks @woodruffw)
  • Add Punycode/IDNA support and integrate with DNS lookup. (#2543, thanks @makenowjust)
  • Add HTTP::Client#options method. (#5824, thanks @mamantoha)
  • Add support for Last-Modified and other cache improvements to HTTP::StaticFileHandler. (#2470, #5607, thanks @bebac and @straight-shoota)
  • Add operations and improvements related to BigDecimal and BigFloat. (#5437, #5390, #5589, #5582, #5638, #5675, thanks @Sija and @mjago)
  • Add BigDecimal and UUID JSON support. (#5525, #5551, thanks @lukeasrodgers and @lachlan)
  • Add missing UUID#inspect. (#5574, thanks @ngsankha)
  • Add Logger configuration in initializer. (#5618, thanks @Sija)
  • Add custom separators in CSV.build. (#5998, #6008 thanks @Sija)
  • Add INI.build to emit INI files. (#5298, thanks @j8r)
  • Add Process.chroot. (#5577, thanks @chris-huxtable)
  • Add Tempfile.tempname to create likely nonexisting filenames. (#5360, thanks @woodruffw)
  • Add FileUtils#ln, ln_s, and ln_sf. (#5421, thanks @woodruffw)
  • Add support 8bit and true color to Colorize. (#5902, thanks @makenowjust)
  • Add comparison operators between classes. (#5645, thanks @asterite)
  • Add exception cause in backtrace. (#5833, thanks @RX14)
  • Add unhandled exception as argument in at_exit. (#5906, thanks @makenowjust)
  • Add support to target aarch64-linux-musl. (#5861, thanks @jirutka)
  • Add #clear method to ArrayLiteral/HashLiteral for macros. (#5265, thanks @Sija...
Read more