Skip to content

@bcardiff bcardiff released this Dec 11, 2019 · 66 commits to master since this release

Language changes

  • Allow boolean negation to be written also as a regular method call expr.!. (#8445, thanks @jan-zajic)

Macros

  • Add TypeNode#class_vars to list class variables of a type in a macro. (#8405, thanks @jan-zajic)
  • Add TypeNode#includers to get an array of types a module is directly included in. (#8133, thanks @Blacksmoke16)
  • Add ArrayLiteral#map_with_index and TupleLiteral#map_with_index. (#8049, thanks @Blacksmoke16)
  • Add docs for ArrayLiteral#reduce. (#8379, thanks @jan-zajic)
  • Add lower: named argument to StringLiteral#camelcase. (#8429, thanks @Blacksmoke16)

Standard library

Numeric

Text

Collections

  • (breaking-change) Deprecate Enumerable#grep, use Enumerable#select. (#8452, thanks @j8r)
  • Fixed Enumerable#minmax, #min, #max for partially comparable values. (#8490, thanks @TedTran2019)
  • Fixed Hash#rehash. (#8450, thanks @asterite)
  • Fixed Array range assignment index out of bounds. (#8347, thanks @asterite)
  • Fixed endless ranged support for String#[]? and Array#[]?. (#8567, thanks @KarthikMAM)
  • Add Hash#compare_by_identity and Set#compare_by_identity. (#8451, thanks @asterite)
  • Add Enumerable#each_cons_pair and Iterator#cons_pair yielding a tuple. (#8332, thanks @straight-shoota)
  • Add offset argument to all map_with_index methods. (#8264, thanks @asterite)
  • (performance) Optimized version of Tuple#to_a. (#8265, thanks @asterite)
  • Add docs to Hash.merge!(other : Hash, &). (#8380, thanks @jan-zajic)
  • Add docs to Hash.select. (#8391, thanks @jan-zajic)
  • Add docs and specs to Enumerable.reduce. (#8378, thanks @jan-zajic)

Serialization

  • (breaking-change) Make XML::Reader#expand raise, introduce XML::Reader#expand? for former behavior. (#8186, thanks @Blacksmoke16)
  • Allow JSON.mapping & YAML.mapping converter attribute to be applied to Array and Hash. (#8156, thanks @rodrigopinto)
  • Add use_json_discriminator and use_yaml_discriminator to choose type based on property value. (#8406, thanks @asterite)
  • Remove return type self restriction from Object.from_json and Object.from_yaml. (#8489, thanks @straight-shoota)

Files

  • (breaking-change) Remove expand home (~) by default in File.expand_path and Path#expand, now opt-in argument. (#7903, thanks @didactic-drunk)
  • Fixed bugs in Path regarding #dirname, #each_part, #each_parent. (#8415, thanks @jan-zajic)
  • Fixed GZip::Reader and GZip::Writer to handle large data sizes. (#8421, thanks @straight-shoota)
  • Fixed File::Info#same_file? by providing access to 64 bit inode numbers. (#8355, thanks @didactic-drunk)

Networking

  • Fixed HTTP::Response#mime_type returns nil on empty Content-Type header. (#8464, thanks @Sija)
  • Fixed handling of unidirectional SSL servers hang. (#8481, thanks @rdp)
  • Add HTTP::Client#write_timeout. (#8507, thanks @Sija)
  • Updated mime type of .js files to text/javascript and include image/webp. (#8342, thanks @mamantoha)
  • Refactor websocket protocol GUID string. (#8339, thanks @vlazar)

Crypto

  • (breaking-change) Enforce single-line results of OpenSSL::DigestBase#base64digest via Base64.strict_encode. (#8215, thanks @j8r)

Concurrency

System

Runtime

Spec

  • Fixed --fail-fast behaviour. (#8453, thanks @asterite)
  • Add before, after, and around hooks. (#8302, thanks @asterite)
  • Restrict the type returned by should_not be_nil and others. (#8412, thanks @asterite)
  • Add ability to randomize specs via --order random|<seed-value>. (#8310, thanks @Fryguy)
  • Add specs for Spec filters. (#8242, thanks @Fryguy)
  • Add ability to tag specs. (#8068, thanks @Fryguy)

Compiler

  • Fixed musl libc detection (Alpine 3.10 regression bug). (#8330, thanks @straight-shoota)
  • Fixed pragmas handling in macros. (#8256, thanks @asterite)
  • Fixed parser crash for 'alias Foo?'. (#8282, thanks @oprypin)
  • Fixed parser error on newline before closing parenthesis. (#8320, thanks @MakeNowJust)
  • Fixed generic subtypes edge cases triggering no target defs error. (#8417, thanks @asterite)
  • Fixed cleanup of local vars reachable by macros. (#8529, thanks @asterite)
  • Add support for LLVM 9. (#8358, thanks @RX14)
  • Add --mcmodel option to compiler. (#8363, thanks @ffwff)
  • Disallow instance_sizeof on union. (#8399, thanks @asterite)
  • Add mention to crystal <command> --help in help. (#3628, thanks @rdp)
  • Improve error message when a filename is misspelled. (#8500, thanks @rdp)
  • Show full path of locally compiled Crystal. (#8486, thanks @rdp)
  • Code cleanups. (#8460, thanks @veelenga)

Language semantics

Tools

Formatter

Doc generator

Playground

  • Do not collapse whitespaces in playground sidebar. (#8528, thanks @hugopl)

Others

Assets 11
You can’t perform that action at this time.