crystal v0.27.0 Release Notes

Release Date: 2018-11-01 // over 5 years ago
  • 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

    • (breaking-change) Rename Time#epoch to Time#to_unix. Also #epoch_ms to #to_unix_ms, and #epoch_f to #to_unix_f. (#6662, thanks @straight-shoota)
    • ๐Ÿ›  Fixed spec for Time::Location.load_local with TZ=nil. (#6740, thanks @straight-shoota)
    • โž• Add support for ISO calendar week to Time. (#6681, thanks @straight-shoota)
    • โž• Add Time::Format support for %G, %g, %V. (#6681, thanks @straight-shoota)
    • โž• Add Time::Location loader support for Windows. (#6363, thanks @straight-shoota)
    • Add Time#to_local_in to change time zone while keeping wall clock. (#6572, thanks @straight-shoota)
    • Add Time::UNIX_EPOCH and drop private UNIX_SECONDS constant. (#6908, thanks @j8r)
    • ๐Ÿ”„ Change Time::DayOfWeek to ISO ordinal numbering based on Monday = 1. (#6555, thanks @straight-shoota)
    • ๐Ÿ”จ Refactor time specs. (#6574, thanks @straight-shoota)
    • โž• Add docs for singular method aliases, add Int#microsecond alias. (#6297, thanks @Sija)

    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

    • (breaking-change) Remove deprecated alias HTTP::Server#bind_ssl. Use HTTP::Server#bind_tls. (#6699, thanks @straight-shoota)
    • โž• Add Socket::Address#pretty_print and #inspect. (#6704, thanks @straight-shoota)
    • โž• Add Socket::IPAddress loopback, unspecified and broadcast methods/constants. (#6710, thanks @straight-shoota)
    • Fixed Socket#reuse_port? if SO_REUSEPORT is not supported. (#6706, thanks @straight-shoota)
    • ๐Ÿ›  Fixed TCPServer handling of reuse_port. (#6940, thanks @RX14)
    • โž• Add docs to demonstrate parameters for HTTP::Client. (#5145, thanks @HCLarsen)
    • โž• Add docs examples to Socket::Server#accept. (#6705, thanks @straight-shoota)
    • ๐Ÿ”จ Refactor socket_spec.cr into separate files. (#6700, thanks @straight-shoota)
    • ๐Ÿ”จ Refactor specs of HTTP::Client to remove inheritance for test server. (#6909, thanks @straight-shoota)
    • ๐Ÿ‘Œ Improve specs for HTTP::Server#close. (#5958, thanks @straight-shoota)
    • ๐Ÿ‘Œ Improve specs for socket. (#6711, thanks @straight-shoota)

    Crypto

    • ๐Ÿ›  Fixed OpenSSL bindings to work with LibreSSL. (#6917, thanks @LVMBDV)
    • โž• Add support for OpenSSL 1.1.1. (#6738, thanks @ysbaddaden)

    Concurrency

    • ๐Ÿ‘Œ Improve POSIX threads integration regarding locking, error and resource management. (#6944, thanks @ysbaddaden)
    • โœ‚ Remove unintended public methods from Channel. (#6714, thanks @asterite)
    • ๐Ÿ”จ Refactor Fiber/Scheduler to isolate responsibilities. (#6897, thanks @ysbaddaden)
    • ๐Ÿ”จ Refactor specs that relied on Fiber.yield behavior. (#6953, thanks @ysbaddaden)

    System

    • ๐Ÿ›  Fixed fork and signal child handlers. (#6426, thanks @ysbaddaden)
    • ๐Ÿ‘‰ Use blocking IO on a TTY if it can't be reopened. (#6660, thanks @Timbus)
    • ๐Ÿ”จ Refactor Process in preparation for Windows support. (#6744, thanks @RX14)

    Spec

    • ๐Ÿ‘ Allow pending to be used without blocks. (#6732, thanks @tswicegood)
    • โž• Add be_empty expectation. (#6614, thanks @mamantoha)
    • โž• Add specs for expectation methods. (#6512, thanks @rodrigopinto)

    Compiler

    • ๐Ÿ›  Fixed don't "ambiguous match" if there's an exact match. (#6618, thanks @asterite)
    • ๐Ÿ›  Fixed allow annotations inside enums. (#6713, thanks @asterite)
    • ๐Ÿ›  Fixed super inside macros will honor arguments. (#6638, thanks @asterite)
    • ๐Ÿ›  Fixed guessed ivar type from splat arguments. (#6648, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed ASTNode#to_s of non-unary operator call without argument. (#6538, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed ASTNode#to_s for multiline macro expression. (#6666, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed ASTNode#to_s for {% verbatim do %} ... {% end %}. (#6665, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed empty case statement normalization. (#6915, thanks @straight-shoota)
    • ๐Ÿ›  Fixed codegen of tuple elements with unreachable elements. (#6659, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed parsing of // corner cases. (#6927, thanks @bcardiff)
    • ๐Ÿ›  Fixed recursive block expansion check for non ProcNotation restriction. (#6932, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed corner case of expressions not typed on main phase but typed on cleanup phase. (#6720, thanks @MakeNowJust)
    • ๐Ÿ‘Œ Improve error traces regarding return, next and break. (#6633, thanks @asterite)
    • โž• Add resolve generics typenodes in macros. (#6617, thanks @asterite)
    • โž• Add support for multiple output values in inline asm. (#6680, thanks @RX14)
    • ๐Ÿ‘Œ Improve parsing of asm operands. (#6688, thanks @RX14)
    • ๐Ÿ”จ Refactor rescue block codegen for Windows. (#6649, thanks @RX14)

    Tools

    • ๐Ÿ‘Œ Improve installation section in README template. (#6914, #6942, thanks @r00ster91)
    • ๐Ÿ‘Œ Improve contributors section in README template. (#7005, thanks @r00ster91)

    Formatter

    • ๐Ÿ›  Fixed formatting of {% verbatim do %} ... {% end %} outside macro. (#6667, thanks @MakeNowJust)
    • ๐Ÿ›  Fixed formatting of // corner cases. (#6927, thanks @bcardiff)
    • ๐Ÿ‘Œ Improve formatting of asm operands. (#6688, thanks @RX14)

    Doc generator

    • โž• Add support for comments after :nodoc: marker. (#6627, thanks @Sija)
    • ๐Ÿ›  Fixed browser performance issue with blur filter. (#6764, thanks @girng)
    • Accessibility improvement in search field. (#6926, thanks @jodylecompte)

    Others

    • CI improvements and housekeeping. (#6658, #6739, #6930, thanks @bcardiff, @RX14)
    • โž• Add VERSION file and support for specifying the build commit. (#6966, thanks @bcardiff)
    • โž• Add support for specifying the build date. (#6788, thanks @peterhoeg)
    • โšก๏ธ Update Contributing section in README.md. (#6911, thanks @r00ster91)