Skip to content

0.36.0

Compare
Choose a tag to compare
@bcardiff bcardiff released this 26 Jan 18:24
· 2529 commits to master since this release
1e6f96a

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

  • (breaking-change) Make Hash#reject!, Hash#select!, and Hash#compact! consistent with Array and return self. (#9904, thanks @caspiano)
  • (breaking-change) Deprecate Hash#delete_if in favor of Hash#reject!, add Dequeue#reject! and Dequeue#select!. (#9878, thanks @caspiano)
  • (breaking-change) Change Set#delete to return Bool. (#9590, thanks @j8r)
  • (breaking-change) Drop deprecated Enumerable#grep. (#9711, thanks @j8r)
  • (breaking-change) Remove Hash#key_index . (#10016, thanks @asterite)
  • (breaking-change) Deprecate StaticArray#[]=(value) in favor of StaticArray#fill. (#10027, thanks @HertzDevil)
  • (breaking-change) Rename Set#{sub,super}set? to {sub,super}set_of?. (#10187, thanks @straight-shoota)
  • (performance) Optimize Array#shift and Array#unshift. (#10081, thanks @asterite)
  • (performance) Array#rotate optimization for small arrays. (#8516, thanks @wontruefree)
  • Fix Hash#dup and Hash#clone to return correct type for subclasses. (#9871, thanks @vlazar)
  • Fix Iterator#cons_pair return type. (#9788, thanks @asterite)
  • Fix key type restriction of Hash#merge block. (#9495, thanks @makenowjust)
  • Fix Range#step. (#10203, thanks @straight-shoota)
  • Let Range#step delegate to begin.step and allow float based ranges to be stepped. (#10209, thanks @straight-shoota)
  • Fix Indexable#join with IO. (#10152, thanks @straight-shoota)
  • Fix Flatten for value-type iterators. (#10096, thanks @f-fr)
  • Fix Indexable.range_to_index_and_count to not raise IndexError. (#10191, thanks @straight-shoota)
  • Handle recursive structures in def_clone, Hash, Array, Dequeue. (#9800, thanks @asterite)
  • Add BitArray#dup. (#9550, thanks @andremedeiros)
  • Allow Iterator#zip to take multiple Iterator arguments. (#9944, thanks @HertzDevil)
  • Add Iterator#with_object(obj, &). (#9956, thanks @HertzDevil)
  • Always clear unused bits of BitArrays. (#10008, thanks @HertzDevil)
  • Update Enumerable#sum(initial, &) docs. (#9860, thanks @jage)
  • Add Array#unsafe_build. (#10092, thanks @straight-shoota)
  • Add identity methods for #sum and #product. (#10151, thanks @straight-shoota)
  • Move combinations, permutations, etc., from Array to Indexable. (#10235, thanks @wonderix)
  • Move sampling methods to Enumerable. (#10129, thanks @HertzDevil)
  • Use Set#add in Set#add documentation. (#9441, thanks @hugopl)
  • Improve Hash#values_at docs. (#9955, thanks @j8r)

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

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