Skip to content

1.13.0

Compare
Choose a tag to compare
@straight-shoota straight-shoota released this 09 Jul 19:50
· 259 commits to master since this release
1.13.0
6831e44

1.13.0 (2024-07-09)

Features

lang

stdlib

compiler

  • (codegen) Add compiler flags -Os and -Oz to optimize binary size (#14463, thanks @ysbaddaden)
  • (codegen) Add compiler support for AVR architecture (Arduino) (#14393, thanks @ysbaddaden)

tools

  • (formatter) Allow new formatter styles for trailing comma and whitespace around proc literal (#14726, thanks @Blacksmoke16)

Bugfixes

lang

  • (macros) Fix parsing of non-trailing if bodies inside macro expressions (#14505, thanks @HertzDevil)
  • (macros) Drop parentheses around -> inside certain comma-separated lists (#14506, thanks @HertzDevil)
  • (macros) Fix indentation of Select nodes' macro interpolation (#14510, thanks @HertzDevil)
  • (macros) Fix indentation of parenthesized Expressions#to_s (#14511, thanks @HertzDevil)

stdlib

  • (collection) [regression] Ensure Enumerable#to_a and Enumerable#tally properly retain return type of T (#14447, thanks @Blacksmoke16)
  • (collection) [breaking] Never raise IndexError in #[]?(Range) (#14444, thanks @HertzDevil)
  • (collection) [breaking] Fix Set#to_a(&) (#14519, thanks @meatball133)
  • (collection) Fix Hash#rehash to reset @first (#14606, thanks @straight-shoota)
  • (collection) Fix macro interpolation in NamedTuple#from (#14790, thanks @HertzDevil)
  • (collection) [regression] Fix regression with NamedTuple.new when using key with a hyphen (#14785, thanks @Blacksmoke16)
  • (files) Allow #fsync and #flock_* on IO::FileDescriptor (#14432, thanks @HertzDevil)
  • (files) Make IO::FileDescriptor#tty? return false for NUL on Windows (#14509, thanks @HertzDevil)
  • (files) Fix blockless IO::FileDescriptor echo and raw mode methods (#14529, thanks @HertzDevil)
  • (files) Remove target path's forward slashes in File.symlink on Windows (#14522, thanks @HertzDevil)
  • (files) Fix IO#same_content? accepting prefix on second stream (#14664, thanks @straight-shoota)
  • (files) Fix overflow in File#read_at for large offsets on Windows (#14708, thanks @HertzDevil)
  • (files) Fix IO::FileDescriptor.new for closed fd (#14697, thanks @straight-shoota)
  • (files) Fix IO::Delimited reading into limited slice with peek (#14772, thanks @straight-shoota)
  • (files) Fix Compress::Gzip extra field (#14550, thanks @kojix2)
  • (log) delete source from builder cache when finalize (#14475, thanks @ysbaddaden)
  • (networking) Fix Socket#close error handling on Windows (#14517, thanks @HertzDevil)
  • (networking) Set UTF-8 charset on directory listing in HTTP::StaticFileHandler (#14546, thanks @alexkutsan)
  • (networking) Don't pass socket file descriptors to subprocesses on Unix (SOCK_CLOEXEC) (#14632, thanks @carlhoerberg)
  • (networking) [security] OpenSSL: don't set default ECDH curve (#14656, thanks @ysbaddaden)
  • (networking) [security] OpenSSL: deprecate Mozilla's TLS Server recommendation (#14657, thanks @ysbaddaden)
  • (networking) use SOCK_CLOEXEC with FD_CLOEXEC fallback (#14672, thanks @ysbaddaden)
  • (networking) [regression] Fix regression on Socket#connect timeout type restriction (#14755, thanks @straight-shoota)
  • (networking) Drop default timeout for Socket#connect on Windows (#14756, thanks @straight-shoota)
  • (networking) don't hardcode alpn protocol byte size (OpenSSL) (#14769, thanks @ysbaddaden)
  • (numeric) Fix BigRational#format (#14525, thanks @meatball133)
  • (numeric) [regression] Restore leading zero in exponent for printf("%e") and printf("%g") (#14695, thanks @straight-shoota)
  • (runtime) Fix enable docs for builtin constants (#14571, thanks @straight-shoota)
  • (runtime) Fix GC.malloc for gc_none to clear memory (#14746, thanks @straight-shoota)
  • (serialization) Fix JSON discriminator for Bool false value (#14779, thanks @dammer)
  • (specs) Fix relative file paths in spec output (#14725, thanks @straight-shoota)
  • (system) Fix using System.retry_with_buffer with stack buffer (#14615, thanks @straight-shoota)
  • (system) Harmonize close on exec for Socket & FileDescriptor on Windows (#14634, thanks @ysbaddaden)
  • (system) Use dup3 and pipe2 to set O_CLOEXEC when available (#14673, thanks @ysbaddaden)
  • (system) Fix calls to retry_with_buffer when big buffer is necessary (#14622, thanks @BlobCodes)
  • (system) Fix Process.run with closed IO (#14698, thanks @straight-shoota)
  • (system) Prefer strerror_r over strerror for thread-safe errno (#14764, thanks @ysbaddaden)
  • (text) Make String#sub raise IndexError if index is equal to size (#14458, thanks @HertzDevil)
  • (text) Fix libpcre2 version detection not working for -RC{N} versions (#14478, thanks @Frityet)
  • (text) Fix Regex#inspect with non-literal-compatible options (#14575, thanks @straight-shoota)
  • (text) Fix ECR escape sequences containing - (#14739, thanks @HertzDevil)

compiler

tools

  • (docs-generator) Fix generate docs for builtins HOST_TRIPLE and TARGET_TRIPLE (#14570, thanks @straight-shoota)
  • (docs-generator) Decode URI component for search functionality in docs (#14645, thanks @nobodywasishere)
  • (formatter) Fix formatting for short block inside #[] operator call (#14526, thanks @HertzDevil)
  • (formatter) Fix formatter to skip trailing comma for single-line parameters (#14713, thanks @Blacksmoke16)

Chores

stdlib

compiler

  • (codegen) [breaking] Remove CRYSTAL_LIBRARY_RPATH and delay-load helper (#14598, thanks @HertzDevil)

Performance

stdlib

Refactor

stdlib

compiler

  • (codegen) Add Program#size_t and Target#size_bit_width (#14442, thanks @ysbaddaden)
  • (parser) Replace Crystal::Select::When with Crystal::When (#14497, thanks @HertzDevil)

Documentation

stdlib

Specs

stdlib

Infrastructure