github crystal-lang/crystal 0.35.0

latest releases: 1.12.1, 1.12.0, 1.11.2...
3 years ago

Language changes

  • (breaking-change) Let case when be non-exhaustive, introduce case in as exhaustive. (#9258, #9045, thanks @asterite)
  • Allow ->@ivar.foo and ->@@cvar.foo expressions. (#9268, thanks @makenowjust)

Macros

  • Allow executing OpAssign (+=, ||=, etc.) inside macros. (#9409, thanks @asterite)

Standard library

Macros

  • (breaking-change) Remove top-level assert_responds_to macro. (#9085, thanks @bcardiff)
  • (breaking-change) Drop top-level parallel macro. (#9097, thanks @bcardiff)
  • Fix lazy property not forwarding annotations. (#9140, thanks @asterite)
  • Add host_flag? macro method, not affected by cross-compilation. (#9049, thanks @oprypin)
  • Add .each and .each_with_index to various macro types. (#9120, thanks @Blacksmoke16)
  • Add StringLiteral#titleize macro method. (#9269, thanks @makenowjust)
  • Add TypeNode methods to check what "type" the node is. (#9270, thanks @Blacksmoke16)
  • Fix support TypeNode.name(generic_args: false) for generic instances. (#9224, thanks @Blacksmoke16)

Numeric

  • (breaking-change) Add Int#digits, reverse BigInt#digits result. (#9383, thanks @asterite)
  • Fix overflow checking for operations with mixed sign. (#9403, thanks @waj)
  • Add BigInt#factorial using GMP. (#9132, thanks @peheje)

Text

Collections

  • (breaking-change) Add Enumerable#first with fallback block. (#8999, thanks @makenowjust)
  • Fix Array#delete_at bug with negative start index. (#9399, thanks @asterite)
  • Fix Enumerable#{zip,zip?} when self is an Iterator. (#9330, thanks @mneumann)
  • Make Range#each and Range#reverse_each work better with end/begin-less values. (#9325, thanks @asterite)
  • Improve docs on Hash. (#8887, thanks @rdp)

Serialization

Time

  • (breaking-change) Support different number of fraction digits for RFC3339 time format. (#9283, thanks @waj)
  • Fix parsing AM/PM hours. (#9334, thanks @straight-shoota)
  • Improve File.utime precision from second to 100-nanosecond on Windows. (#9344, thanks @kubo)

Files

Networking

  • (breaking-change) Make IO#skip, IO#write returns the number of bytes it skipped/written as Int64. (#9233, #9363, thanks @bcardiff)
  • (breaking-change) Improve error handling and logging in HTTP::Server. (#9115, #9034, thanks @waj, @straight-shoota)
  • (breaking-change) Change HTTP::Request#remote_address type to Socket::Address?. (#9210, thanks @waj)
  • Fix flush methods to always flush underlying IO. (#9320, thanks @straight-shoota)
  • Fix HTTP::Server sporadic failure in SSL handshake. (#9177, thanks @waj)
  • WebSocket shouldn't reply with same close code. (#9313, thanks @waj)
  • Ignore response body during WebSocket handshake. (#9418, thanks @waj)
  • Treat cookies which expire in this instant as expired. (#9061, thanks @RX14)
  • Set sync or flush_on_newline for standard I/O on Windows. (#9207, thanks @kubo)
  • Prefer HTTP basic authentication in OAuth2 client. (#9127, thanks @crush-157)
  • Defer request upgrade in HTTP::Server (aka: WebSockets). (#9243, thanks @waj)
  • Improve URI::Punycode, HTTP::WebSocketHandler, HTTP::Status documentation. (#9068, #9130, #9180, thanks @Blacksmoke16, @dscottboggs, @wontruefree)
  • Remove HTTP::Params::Builder#to_s, use underlying IO directly. (#9319, thanks @straight-shoota)
  • Fixed some regular failing specs in multi-thread mode. (#9412, thanks @bcardiff)

Crypto

Logging

Concurrency

System

Runtime

  • (breaking-change) Deprecate top-level fork. (#9136, thanks @bcardiff)
  • (breaking-change) Move Debug to Crystal namespace. (#9176, thanks @bcardiff)
  • Fix segfaults when static linking with musl. (#9238, thanks @waj)
  • Allow calling at_exit inside at_exit. (#9388, thanks @asterite)
  • Rework DWARF loading and fix empty backtraces in musl. (#9267, thanks @waj)
  • Add DragonFly(BSD) support. (#9178, thanks @mneumann)
  • Add Crystal::System::Process to split out system-specific implementations. (#9035, thanks @oprypin)
  • Move internal CallStack to Exception::CallStack. (#9076, thanks @bcardiff)
  • Specify pkg-config name for libevent. (#9395, thanks @jhass)

Spec

Compiler

Language semantics

  • Fix RegexLiteral#to_s output when first character of literal is whitespace. (#9017, thanks @makenowjust)
  • Fix autocasting in multidispatch. (#9004, thanks @asterite)
  • Fix propagation of annotations into other scopes. (#9125, thanks @asterite)
  • Fix yield computation inside macro code. (#9324, thanks @asterite)
  • Fix incorrect type generated with as? when type is a union. (#9417, #9435, thanks @asterite)
  • Don't duplicate instance var in inherited generic type. (#9433, thanks @asterite)
  • Ensure type_vars works for generic modules. (#9161, thanks @toddsundsted)
  • Make autocasting work in default values against unions. (#9366, thanks @asterite)
  • Skip no closure check for non-Crystal procs. (#9248, thanks @jhass)

Debugger

Tools

Formatter

Doc generator

Playground

  • Allow building compiler without 'playground', to avoid dependency on sockets. (#9031, thanks @oprypin)
  • Add support to jquery version 3. (#9028, thanks @deiv)

Others

Don't miss a new crystal release

NewReleases is sending notifications on new releases.