github crystal-lang/crystal 0.36.0

latest releases: 1.13.3, 1.13.2, 1.13.1...
3 years ago

Language changes

  • (breaking-change) Reject annotations on ivars defined in base class. (#9502, thanks @waj)
  • (breaking-change) Make ** be right associative. (#9684, thanks @asterite)

Macros

Standard library

Macros

Numeric

Text

  • (breaking-change) Fix String#index not working well for broken UTF-8 sequences. (#9713, thanks @asterite)
  • (performance) String: Don't materialize Regex match[0] if not needed. (#9615, thanks @asterite)
  • Fix String#rindex default offset for matching empty regex correctly. (#9690, thanks @makenowjust)
  • Add various String#delete_at methods. (#9398, thanks @asterite)
  • Raise if passing null Pointer to String. (#9653, thanks @jgaskins)
  • Add Regex#capture_count. (#9746, thanks @Sija)
  • Add Regex::MatchData#[] overloading to Range. (#10076, thanks @makenowjust)
  • Fix duplicates in String documentation. (#9987, thanks @Nicolab)
  • Add docs for substitution to Kernel.sprintf. (#10227, thanks @straight-shoota)

Collections

Serialization

Time

Files

Networking

Logging

  • (breaking-change) Drop deprecated Logger. (#9525, thanks @bcardiff)
  • (performance) Add logging dispatcher to defer entry dispatch from current fiber. (#9432, thanks @waj)
  • Take timestamp as an argument in Log::Entry initializer. (#9570, thanks @Sija)
  • Improve docs regarding Log.setup. (#9497, #9559, thanks @caspiano, @jjlorenzo)

Crypto

  • (security) Fix "force-peer" verify_mode setup. (#9668, thanks @PhilAtWysdom)
  • (security) Force secure renegotiation on server to prevent Secure Client-Initiated Renegotiation vulnerability attack. (#9815, thanks @bcardiff)
  • (breaking-change) Refactor Digest and introduce Digest::MD5, Digest::SHA1, Digest::SHA256, Digest::SHA512 backed by openssl. (#9864, thanks @bcardiff)
  • Fix overflows in MD5 and SHA1. (#9781, thanks @bcardiff)
  • Add OpenSSL::SSL::Context#set_modern_ciphers and related methods to set ciphers and cipher suites in a more portable fashion. (#9814, #10298, thanks @bcardiff)
  • Add OpenSSL::SSL::Context#security_level. (#9831, thanks @bcardiff)
  • OpenSSL::digest add require for OpenSSL::Error. (#10173, thanks @wonderix)

Concurrency

  • (breaking-change) Hide Channel internal implementation methods. (#9564, thanks @j8r)
  • Channel#close returns true unless the channel was already closed. (#9443, thanks @waj)
  • Support splat expressions inside spawn macro. (#10234, thanks @HertzDevil)
  • Remove incorrect note about negative timeout not triggering. (#10131, thanks @straight-shoota)

System

  • Fix Process.find_executable to check the found path is executable and add Windows support. (#9365, thanks @oprypin)
  • Add Process.parse_arguments and fix CRYSTAL_OPTS parsing. (#9518, thanks @makenowjust)
  • Port to NetBSD. (#9360, thanks @Niacat)
  • Add note about raising IO::Error to Process methods. (#9894, thanks @straight-shoota)
  • Handle errors in User/Group from_name?/from_id? as not found. (#10182, thanks @wonderix)
  • define the SC_PAGESIZE constant on more platforms. (#9821, thanks @carlhoerberg)

Runtime

  • Fix bug with passing many args then a struct in Win64 C lib ABI. (#9520, thanks @oprypin)
  • Fix C ABI for AArch64. (#9430, thanks @jhass)
  • Disable LLVM Global Isel. (#9401, #9562, thanks @jhass, @bcardiff)
  • Print original exception after failing to raise it. (#9220, thanks @jhass)
  • Use Dwarf information on Exception::CallStack.print_frame and crash stacktraces. (#9792, #9852, thanks @bcardiff)
  • MachO: Handle missing LC_UUID. (#9706, thanks @bcardiff)
  • Allow WeakRef to compile with -Dgc_none. (#9806, thanks @bcardiff)
  • Fix example in Crystal.main docs. (#9736, thanks @hugopl)
  • Add a C ABI spec for accepting a large struct - failing on Win32, AArch64. (#9534, thanks @oprypin)
  • Don't relativize paths outside of current directory in backtrace. (#10177, thanks @Sija)
  • Avoid loading DWARF if env var CRYSTAL_LOAD_DWARF=0. (#10261, thanks @bcardiff)
  • Fix DWARF loading in FreeBSD. (#10259, thanks @bcardiff)
  • Print unhandled exceptions from main routine with #inspect_with_backtrace. (#10086, thanks @straight-shoota)

Spec

Compiler

Language semantics

  • (breaking-change) Handle union restrictions with free vars properly. (#10267, thanks @HertzDevil)
  • (breaking-change) Disallow keywords as block argument name. (#9704, thanks @asterite)
  • (breaking-change) Fix a-b -c incorrectly parsed as a - (b - c). (#9652, #9884, thanks @asterite, @bcardiff)
  • (breaking-change) Check abstract def implementations with splats, default values and keyword arguments. (#9585, thanks @waj)
  • (breaking-change) Make abstract def return type warning an error. (#9810, thanks @bcardiff)
  • (breaking-change) Error when abstract def implementation adds a type restriction. (#9634, thanks @waj)
  • (breaking-change) Don't interpret Proc typedefs as aliases. (#10254, thanks @HertzDevil)
  • (breaking-change) Remove the special logic of union of pointer and nil. (#9872, thanks @asterite)
  • Check abstract def implementations with double splats. (#9633, thanks @waj)
  • Make inherited hook work through generic instances. (#9701, thanks @asterite)
  • Attach doc comment to annotation in macro expansion. (#9630, thanks @makenowjust)
  • Marks else branch of exhaustive case as unreachable, improving resulting type. (#9659, thanks @Sija)
  • Make Pointer(T)#value= stricter for generic arguments. (#10224, thanks @asterite)
  • Extend type filtering of conditional clauses to arbitrary logical connectives. (#10147, thanks @HertzDevil)
  • Support NamedTuple instance restrictions in redefinition checks. (#10245, thanks @HertzDevil)
  • Respect block arg restriction when given block has a splat parameter. (#10242, thanks @HertzDevil)
  • Make overloads without double splat more specialized than overloads with one. (#10185, thanks @HertzDevil)
  • Support type splats inside explicit Unions in type restrictions. (#10174, thanks @HertzDevil)
  • Fix splats on generic arguments. (#9859, thanks @asterite)
  • Correctly compute line number after macro escape. (#9858, thanks @asterite)
  • Fix bug for C structs assigned to a type. (#9743, thanks @matthewmcgarvey)
  • Promote C variadic args as needed. (#9747, thanks @asterite)
  • Fix parsing of def self./ and def self.%. (#9721, thanks @asterite)
  • Fix ASTNode#to_s for parenthesized expression in block. (#9629, thanks @makenowjust)
  • Don't form a closure on typeof(@ivar). (#9723, thanks @asterite)
  • Add a few missing expanded.transform self. (#9506, thanks @asterite)
  • Treat super as special only if it doesn't have a receiver (i.e.: allow super user defined methods). (#10011, thanks @asterite)
  • Implement auto-casting in a better way. (#9501, thanks @asterite)
  • Try literal type first when autocasting to unions types. (#9610, thanks @asterite)
  • Correctly pass named arguments for previous_def and super. (#9834, thanks @asterite)
  • Turn proc pointer into proc literal in some cases to closure needed variables. (#9824, thanks @asterite)
  • Fix proc of self causing multi-dispatch. (#9972, thanks @asterite)
  • Fixes and improvements to closured variables. (#9986, thanks @asterite)
  • Don't merge proc types but allow assigning them if they are compatible. (#9971, thanks @asterite)
  • Reset nilable vars inside block method. (#10091, thanks @asterite)
  • Reset free vars before attempting each overload match. (#10271, thanks @HertzDevil)
  • Let offsetof support Tuples. (#10218, thanks @hugopl)

Tools

  • Fetch git config correctly. (#9640, thanks @dorianmariefr)

Formatter

  • Avoid adding a newline after comment before end. (#9722, thanks @asterite)
  • Apply string pieces combination even if heredoc has no indent. (#9475, thanks @makenowjust)
  • Correctly format named arguments like foo:bar. (#9740, thanks @asterite)
  • Handle comment before do in a separate line. (#9762, thanks @asterite)
  • Fix indent for the first comment of select when/else. (#10002, thanks @makenowjust)
  • Reduce redundant newlines at end of begin ... end. (#9741, thanks @makenowjust)
  • Let formatter normalize crystal language tag for code blocks in doc comments. (#10156, thanks @straight-shoota)
  • Fix indentation of trailing comma in call with a block. (#10223, thanks @makenowjust)

Doc generator

Others

Don't miss a new crystal release

NewReleases is sending notifications on new releases.