Releases: crystal-lang/crystal
Releases · crystal-lang/crystal
0.25.1
Standard library
Macros
- Fixed
Object.delegate
is now able to be used with[]=
methods. (#6178, thanks @straight-shoota) - Fixed
p!
pp!
are now able to be used with tuples. (#6244, thanks @bcardiff) - Add
#copy_with
method to structs generated byrecord
macro. (#5736, thanks @chris-baynes) - Add docs for
ArrayLiteral#push
and#unshift
. (#6232, thanks @makenowjust)
Collections
- Add docs for
Indexable#zip
and#zip?
methods. (#5734, thanks @rodrigopinto)
Serialization
- Add
#dup
and#clone
forJSON::Any
andYAML::Any
. (6266, thanks @asterite) - Add docs example of nesting mappings to
YAML.builder
. (#6097, thanks @kalinon)
Time
- Fixed docs regarding formatting and parsing
Time
. (#6208, #6214, thanks @r00ster91 and @straight-shoota) - Fixed
Time
internals for future windows support. (#6181, thanks @RX14) - Add
Time::Span#microseconds
,Int#microseconds
andFloat#microseconds
. (#6272, thanks @asterite) - Add specs. (#6174, thanks @straight-shoota)
Files
- Fixed
File.extname
edge case. (#6234, thanks @bcardiff) - Fixed
FileInfo#flags
return value. (#6248, thanks @fgimian)
Networking
- Fixed
IO#write(slice : Bytes)
won't write information if slice is empty. (#6269, thanks @asterite) - Fixed docs regarding
HTTP::Server#bind_tcp
method. (#6179, #6233, thanks @straight-shoota and @makenowjust) - Add Etag support in
HTTP::StaticFileHandler
. (#6145, thanks @emq)
Misc
- Fixed
mmap
usage on OpenBSD 6.3+. (#6250, thanks @jcs) - Fixed
big/big_int
,big/big_float
, etc are now able to be included directly. (#6267, thanks @asterite) - Refactor dependency in
Crystal::Hasher
to avoid load order issues. (#6184, thanks @ysbaddaden)
Compiler
- Fixed a leakage of unbounded generic type variable and show error. (#6128, thanks @asterite)
- Fixed error message when lookup of library fails and lib's name contains non-alpha chars. (#6187, thanks @oprypin)
- Fixed integer kind deduction for very large negative numbers. (#6182, thanks @rGradeStd)
- Refactor specs tempfiles and data files usage in favor of portability (#5951, thanks @straight-shoota)
- Improve formatting and information in some compiler error messages. (#6261, thanks @RX14)
Tools
Formatter
- Fixed crash when semicolon after block paren were present. (#6192, thanks @makenowjust)
- Fixed invalid code produced when heredoc and comma were present. (#6222, thanks @straight-shoota and @makenowjust)
- Fixed crash when one-liner
begin
/rescue
were present. (#6274, thanks @asterite)
Doc generator
- Fixed JSON export that prevent jumping to constant. (#6218, thanks @straight-shoota)
- Fixed crash when virtual types were reached. (#6246, thanks @bcardiff)
Misc
0.25.0
New features and breaking changes
- (breaking-change) Time zones has been added to
Time
. (#5324, #5819, thanks @straight-shoota) - (breaking-change) Drop
HTTP.rfc1123_date
in favor ofHTTP.format_time
and add time format implementations for ISO-8601, RFC-3339, and RFC-2822. (#5123, thanks @straight-shoota) - (breaking-change)
crystal deps
is removed, useshards
. (#5544, thanks @asterite) - (breaking-change)
Hash#key
was renamed asHash#key_for
. (#5444, thanks @marksiemers) - (breaking-change)
JSON::Any
andYAML::Any
have been re-implemented solving some inconsistencies and avoiding the usage of recursive aliases (JSON::Type
andYAML::Type
have been removed). (#5183, thanks @asterite) - (breaking-change) Multiple heredocs can be used as arguments and methods can be invoked writing them in the initial delimiter, also empty heredocs are now supported. (#5578, #5602, #6048, thanks @asterite and @makenowjust)
- (breaking-change) Refactor signal handlers and avoid closing pipe at exit. (#5730, thanks @ysbaddaden)
- (breaking-change) Improve behaviour of
File.join
with empty path component. (#5915, thanks @straight-shoota) - (breaking-change) Drop
Colorize#push
in favor ofColorize#surround
and allow nested calls across the stack. (#4196, thanks @makenowjust) - (breaking-change)
File.stat
was renamed toFile.info
and a more portable API was implemented. (#5584, #6161, thanks @RX14 and @bcardiff) - (breaking-change) Refactor
HTTP::Server
to bind to multiple addresses. (#5776, #5959, thanks @straight-shoota) - (breaking-change) Remove block argument from
loop
. (#6026, thanks @asterite) - (breaking-change) Do not collapse unions for sibling types. (#6024, thanks @asterite)
- (breaking-change) Disallow
typeof
in type restrictions. (#5192, thanks @asterite) - (breaking-change) Perform unbuffered read when
IO::Buffered#sync = true
. (#5849, thanks @RX14) - (breaking-change) Drop
when _
support. (#6150, thanks @makenowjust) - (breaking-change) The
DivisionByZero
exception was renamed toDivisionByZeroError
. (#5395, thanks @sdogruyol) - A bootstrap windows port has been added to the standard library. It's not usable for real programs yet. (#5339, #5484, #5448, thanks @RX14)
- Add automatic casts on literals arguments for numbers and enums. (#6074, thanks @asterite)
- Add user defined annotations. (#6063, #6084, #6106, thanks @asterite)
- Add macro verbatim blocks to avoid nested macros. (#6108, thanks @asterite)
- Allow namespaced expressions to define constants eg:
Foo::Bar = 1
. (#5883, thanks @bew) - Allow trailing
=
in symbol literals. (#5969, thanks @straight-shoota) - Allow redefining
None
to0
for@[Flags]
enum. (#6160, thanks @bew) - Suggest possible solutions to failing requires. (#5487, thanks @RX14)
- Allow pointers of external C library global variables. (#4845, thanks @larubujo)
- Decouple pretty-printing (
pp
) and showing the expression (!
):p
,pp
,p!
,pp!
. (#6044, thanks @asterite) - Add ivars default value reflection in macros. (#5974, thanks @asterite)
- Add argless overload to
Number#round
to rounds to the nearest whole number. (#5397, thanks @Sija) - Add
Int#bits_set?
to easily check that certain bits are set. (#5619, thanks @RX14) - Add
Float32
andFloat64
constants. (#4787, thanks @konovod) - Add allocated bytes per operation in
Benchmark.ips
. (#5522, thanks @asterite) - Add
String#to_utf16
andString.from_utf16
. (#5541, #5579, #5583 thanks @asterite, @RX14 and @straight-shoota) - Add
String#starts_with?(re: Regex)
. (#5485, thanks @makenowjust) - Add
Regex.needs_escape?
. (#5962, thanks @Sija) - Add
Hash#last_key
andHash#last_value
. (#5760, thanks @j8r) - Add no-copy iteration to
Indexable
. (#4584, thanks @cjgajard) - Add
Time#at_{beginning,end}_of_second
(#6167, thanks @straight-shoota) - Add
IO::Stapled
to combine two unidirectionalIO
s into a single bidirectional one. (#6017, thanks @straight-shoota) - Add context to errors in
JSON.mapping
generated code. (#5932, thanks @straight-shoota) - Add
JSON::Serializable
andYAML::Serializable
attribute powered mappings. (#6082, thanks @kostya) - Add
mode
param toFile.write
. (#5754, thanks @woodruffw) - Add Punycode/IDNA support and integrate with DNS lookup. (#2543, thanks @makenowjust)
- Add
HTTP::Client#options
method. (#5824, thanks @mamantoha) - Add support for
Last-Modified
and other cache improvements toHTTP::StaticFileHandler
. (#2470, #5607, thanks @bebac and @straight-shoota) - Add operations and improvements related to
BigDecimal
andBigFloat
. (#5437, #5390, #5589, #5582, #5638, #5675, thanks @Sija and @mjago) - Add
BigDecimal
andUUID
JSON support. (#5525, #5551, thanks @lukeasrodgers and @lachlan) - Add missing
UUID#inspect
. (#5574, thanks @ngsankha) - Add
Logger
configuration in initializer. (#5618, thanks @Sija) - Add custom separators in
CSV.build
. (#5998, #6008 thanks @Sija) - Add
INI.build
to emitINI
files. (#5298, thanks @j8r) - Add
Process.chroot
. (#5577, thanks @chris-huxtable) - Add
Tempfile.tempname
to create likely nonexisting filenames. (#5360, thanks @woodruffw) - Add
FileUtils#ln
,ln_s
, andln_sf
. (#5421, thanks @woodruffw) - Add support 8bit and true color to
Colorize
. (#5902, thanks @makenowjust) - Add comparison operators between classes. (#5645, thanks @asterite)
- Add exception cause in backtrace. (#5833, thanks @RX14)
- Add unhandled exception as argument in
at_exit
. (#5906, thanks @makenowjust) - Add support to target aarch64-linux-musl. (#5861, thanks @jirutka)
- Add
#clear
method toArrayLiteral
/HashLiteral
for macros. (#5265, thanks @Sija...
0.24.2
- Fixed an
Index out of bounds
raised duringat_exit
(#5224, #5565, thanks @ysbaddaden) - Re-add
Dir#each
so it complies withEnumerable
(#5458, thanks @bcardiff) - Fixed
SSL::Context
bug verifying certificates (#5266, #5601, thanks @waj) - Fixed UUID documentation that was missing (#5478, #5542, thanks @asterite)
- Fixed a bug with single expressions in parenthesis (#5482, #5511, #5513, thanks @makenowjust)
- Fixed
skip_file
macro docs (#5488, thanks @straight-shoota) - Fixed CI
build
script'sLIBRARY_PATH
(#5457, #5461, thanks @bcardiff) - Fixed formatter bug with upper-cased
fun
names (#5432, #5434, thanks @bew)
0.24.1
New features
- Add ThinLTO support for faster release builds in LLVM 4.0 and above. (#4367, thanks @bcardiff)
- (breaking-change) Add
UUID
type.Random::Secure.uuid
has been replaced withUUID.random
. (#4453, thanks @wontruefree) - Add a
BigDecimal
class for arbitrary precision, exact, decimal numbers. (#4876 and #5255, thanks @vegai and @Sija) - Allow
Set
to work as a case condition, which matches when the case variable is inside the set. (#5269, thanks @makenowjust) - (breaking-change) Change
Time::Format
codes to allow more robust options for parsing sub-second precision times. (#5317, thanks @bcardiff) - Add
Time.utc
, an alias ofTime.new
which shortens creating UTC times. (#5321, thanks @straight-shoota) - Add custom extension support to
Tempfile
. (#5264, thanks @jreinert) - Add
reduce
method toTupleLiteral
andArrayLiteral
when using macros. (#5294, thanks @javanut13) - Export a JSON representation of the documentation in the generated output. (#4746 and #5228, thanks @straight-shoota)
- Make
gc/none
garbage collection compile again and allow it to be enbled using-Dgc_none
compiler flag. (#5314, thanks @ysbaddaden)
Standard library bugs fixed
- Make
String#[]
unable to read out-of-bounds when the string ends in a unicode character. (#5257, thanks @Papierkorb) - Fix incorrect parsing of long JSON floating point values. (#5323, thanks @benoist)
- Replace the default hash function with one resistant to hash DoS. (#5146, thanks @funny-falcon)
- Ensure equal numbers always have the same hashcode. (#5276, thanks @akzhan)
- Fix struct equality when two structs descend from the same abstract struct. (#5254, thanks @hinrik)
- Fix
URI#full_path
not to append a?
unless the query params are nonempty. (#5340, thanks @paulcsmith) - Fix
HTTP::Params.parse
to parse&&
correctly. (#5274, thanks @akiicat) - Disallow null bytes in
ENV
keys and values. (#5216, thanks @Papierkorb) - Disallow null bytes in
XML::Node
names and content. (#5200, thanks @RX14) - Fix
IO#blocking=
on OpenBSD. (#5283, thanks @wmoxam) - Fix linking programs in OpenBSD. (#5282, thanks @wmoxam)
Compiler bugs fixed
- Stop incorrectly finding top-level methods when searching for a
super
method. (#5202, thanks @lbguilherme) - Fix parsing regex literals starting with a
;
directly after a call (exp /;/
). (#5208, thanks @makenowjust) - Correct a case where
Expressions#to_s
could produce invalid output, causing macro expansion to fail. (#5226, thanks @asterite) - Give error instead of crashing when
self
is used at the top level. (#5227, thanks @makenowjust) - Give error instead of crashing when using
instance_sizeof
on a generic type without providing it's type arguments. (#5209, thanks @lbguilherme) - Fix parsing calls when short block syntax (
&.foo
) is followed by a newline. (#5237, thanks @makenowjust) - Give error instead of crashing when an unterminated string array literal (
%w()
) sits at the end of a file. (#5241, thanks @asterite) - Give error when attempting to use macro yield (
{{yield}}
) outside a macro. (#5307, thanks @makenowjust) - Fix error related to generic inheritance. (#5284, thanks @makenowjust)
- Fix compiler crash when using recursive alias and generics. (#5330, thanks @makenowjust)
- Fix parsing
foo(+1)
asfoo + 1
instead offoo(1)
wherefoo
was a local variable. (#5336, thanks @makenowjust) - Documentation generator: Keep quoted symbol literals quoted when syntax highlighting code blocks in documentation output. (#5238, thanks @makenowjust)
- Documentation generator: Keep the original delimiter used when syntax highlighting string array literals. (#5297, thanks @makenowjust)
- Documentation generator: Fix XSS vulnerability when syntax highlighting string array literals. (#5259, thanks @makenowjust)
- Formatter: fix indentation of the last comment in a
begin
/end
block. (#5198, thanks @makenowjust) - Formatter: fix formatting parentheses with multiple lines in. (#5268, thanks @makenowjust)
- Formatter: fix formatting
$1?
. (#5313, thanks @makenowjust) - Formatter: ensure to insert a space between
{
and%
characters to avoid forming{%
macros. (#5278, thanks @makenowjust)
Misc
- Fix
Makefile
, CI, and gitignore to use the new documentation path after #4937. (#5217, thanks @straight-shoota) - Miscellaneous code cleanups. (#5318, #5341 and #5366, thanks @bew and @mig-hub)
- Documentation fixes. (#5253, #5296, #5300 and #5322, thanks @arcage, @icyleaf, @straight-shoota and @bew)
- Fix the in-repository changelog to include 0.24.0. (#5331, thanks @sdogruyol)
0.24.0
⚠️ WARNING: this is a pre-release version of Crystal. Do not use this in production.
- (breaking-change)
HTTP::Client#post_form
is nowHTTP::Client.post(form: ...)
- (breaking-change)
Array#reject!
,Array#compact!
andArray#select!
now returnself
(#5154) - (breaking-change) Remove the possibility to require
big_int
,big_float
orbig_rational
individually: userequire "big"
instead (#5121) - (breaking-change) Spec: remove
expect_raises
without type argument (#5096) - (breaking-change)
IO
is now a class, no longer a module (#4901) - (breaking-change) Time constructors now have
nanosecond
andkind
as named argument (#5072) - (breaking-change) Removed
XML.escape
. UseHTML.escape
instead (#5046) - (breaking-change) Removed
macro def
(#5040) - (breaking-change)
SecureRandom
is nowRandom::Secure
(#4894) - (breaking-change)
HTML.escape
now only escapes &<>"' (#5012) - (breaking-change) To define a custom
hash
method you must now definehash(hasher)
(#4946) - (breaking-change)
Flate::Reader.new(&block)
andFlate::Writer.new(&block)
now use the nameopen
(#4887) - (breaking-change) Use an Enum for Process stdio redirections (#4445)
- (breaking-change) Remove '$0' special syntax
- (breaking-change) Remove bare array creation from multi assign (
a = 1, 2, 3
) (#4824) - (breaking-change) Rename
skip
macro method toskip_file
(#4709) - (breaking-change)
StaticArray#map
andSlice#map
now return their same type instead ofArray
(#5124) - (breaking-change)
Tuple#map_with_index
now returns a Tuple. (#5086) - Packages built with LLVM 3.9.1. They should (hopefully) fix #4719
- Syntax: Allow flat rescue/ensure/else block in do/end block (#5114)
- Syntax:
fun
names and lib function calls can now start with Uppercase - Macros: Using an alias in macros will now automatically resolve it to is aliased type (#4995)
- Macros: The flags
bits32
andbits64
are now automatically defined in macros - The
YAML
module has now full support for the 1.1 core schema with additional types, and properly supports aliases and merge keys (#5007) - Add
--output
option tocrystal docs
(#4937) - Add
Time#days_in_year
: it returns the no of days in a given year (#5163) - Add
Time.monotonic
to return monotonic clock (#5108) - Add
remove_empty
option to manyString#split
overloads - Add
Math.sqrt
overloads for Bigs (#5113) - Add
--stdin-filename
tocrystal
command to compile source from STDIN (#4571) - Add
Crystal.main
to more easily redefine themain
of a program (#4998) - Add
Tuple.types
that returns a tuple of types (#4962) - Add
NamedTuple.types
that returns a named tuple of types (#4962) - Add
NamedTuple#merge(other : NamedTuple)
(#4688) - Add YAML and JSON.mapping
presence: true
option (#4843) - Add
Dir.each_child(&block)
(#4811) - Add
Dir.children
(#4808) HTML.unescape
now supports all HTML5 named entities (#5064)Regex
now supports duplicated named captures (#5061)rand(0)
is now valid and returns 0Tuple#[]
now supports a negative index (#4735)JSON::Builder#field
now accepts non-scalar values (#4706)Number#inspect
now shows the number type- Some additions to Big arithmetics (#4653)
- Increase the precision of
Time
andTime::Span
to nanoseconds (#5022) - Upgrade Unicode to 10.0.0 (#5122)
- Support LLVM 5.0 (#4821)
- Lots of bugs fixed
0.23.1
This is mainly a bugfix release.
The biggest changes are not in the compiler's codebase, but in the release process. Specifically, compatibility with older platforms lost in the 0.23.0 release has been recovered (Debian 7/Ubuntu 14.04, Centos 6), while keeping the builds with LLVM 3.8.
- Fixed macro lookup from included modules (thanks @straight-shoota, @asterite, see #4639)
- Fixed WebSocket Upgrade header is now case-insensitively compared (thanks @makenowjust, see #4617)
- Upgraded PCRE version with security fixes (thanks @Sija, @ivy, see crystal-lang/omnibus-crystal#20)
- Added PCG32 random generator, now the default one (thanks @konovod, see #4536)
- Added
crystal tool format
in man page (thanks @makenowjust, see #4643) - Docs & platform improvements
0.23.0
This release has been built with LLVM 3.8.
As discussed in crystal-lang/omnibus-crystal#17, that means dropping support for Debian 7, and CentOS. Users on those platforms can still build from source using LLVM 3.5, but that's not recommended since it's buggy (see #4104).
- (breaking-change)
Logger#formatter
takes aSeverity
instead of aString
(See #4355, #4369, thanks @Sija) - (breaking-change) Removed
IO.select
(See #4392, thanks @RX14) - Added
Crystal::System::Random
namespace (See #4450, thanks @ysbaddaden) - Added
Path#resolve?
macro method (See #4370, #4408, thanks @RX14) - Added range methods to
BitArray
(See #4397, #3968, thanks @RX14) - Added some well-known HTTP Status messages (See #4419, thanks @akzhan)
- Added compiler progress indicator (See #4182, thanks @RX14)
- Added
System.cpu_cores
(See #4449, #4226, thanks @miketheman) - Added
separator
andquote_char
toCSV#each_row
(See #4448, thanks @timsu) - Added
map_with_index!
toPointer
,Array
andStaticArray
(See #4456, #3356, #3354, thanks @Nephos) - Added
headers
parameter toHTTP::WebSocket
constructors (See #4227, #4222, thanks @adamtrilling) HTTP::StaticFileHandler
can disable directory listing (See #4403, #4398, thanks @joaodiogocosta)bin/crystal
now uses/bin/sh
instead of/bin/bash
(See #3809, #4410, thanks @TheLonelyGhost)crystal init
generates a.editorconfig
file (See #4422, #297, thanks @akzhan)man
page forcrystal
command (See #2989, #1291, thanks @dread-uo)- Re-raising an exception doesn't overwrite its callstack (See #4487, #4482, thanks @akzhan)
- MD5 and SHA1 documentation clearly states they are not cryptographically secure anymore (See #4426, thanks @RX14)
- Fixed Crystal not reusing .o files across builds (See #4336)
- Fixed
SomeClass.class.is_a?(SomeConst)
causing an "already had enclosing call" exception (See #4364, #4390, thanks @rockwyc992) - Fixed
HTTP::Params.parse
query string with two=
gave wrong result (See #4388, #4389, thanks @akiicat) - Fixed
Class.class.is_a?(Class.class.class.class.class)
🎉 (See #4375, #4374, thanks @rockwyc992) - Fixed select hanging when sending before receive (See #3862, #3899, thanks @kostya)
- Fixed "Unknown key in access token json: id_token" error in OAuth2 client (See #4437)
- Fixed macro lookup conflicting with method lookup when including on top level (See #236)
- Fixed Vagrant images (see #4510, #4508, thanks @Val)
- Some bug fixes
0.22.0
- (breaking-change) Removed
Process.new(pid)
is now private (See #4197) - (breaking-change)
IO#peek
now returns an empty slice on EOF (See #4240, #4261) - (breaking-change) Rename
WeakRef#target
toWeakRef#value
(See #4293) - (breaking-change) Rename
HTTP::Params.from_hash
toHTTP::Params.encode
(See #4205) - (breaking-change)
'\"'
is now invalid, use'"'
(See #4309) - Improved backtrace function names are now read from DWARF sections (See #3958, thanks @ysbaddaden)
- Improved sigfaults and exceptions are printed to STDERR (See #4163, thanks @Sija)
- Improved SSL Sockets are now buffered (See #4248)
- Improved type inference on loops (See #4242, #4243)
- Improved
pp
andp
, the printed value is returned (See #4285, #4283, thanks @makenowjust) - Added support for OpenSSL 1.1.0 (See #4215, #4230, thanks @ysbaddaden)
- Added
SecureRandom#random_bytes(Bytes)
(See #4191, thanks @konovod) - Added setting and deleting of attributes on
XML::Node
(See #3902, thanks @bmmcginty) - Added
File.touch
andFileUtils.touch
methods (See #4069, thanks @Sija) - Added
#values_at
forCSV
(See #4157, thanks @need47) - Added
Time#clone
(See #4174, thanks @Sija) - Added
ancestors
macro method (See #3875, thanks @david50407) - Added
skip
macro method (#4237, thanks @mverzilli) - Added
Colorize.on_tty_only!
for easier toggling (See #4075, #4271, thanks @makenowjust) - Added
WebSocket#on_binary
to receive binary messages (See #2774, thanks @lbguilherme) - Fixed
Iterator.of
stops iterating whenIterator.stop
is returned (See #4208) - Fixed
String#insert
for non-ascii Char (See #4164, thanks @Papierkorb) - Fixed
File.link
now creates a hard link (#4116, thanks @KCreate) - Fixed error message for
#to_h
over emptyNamedTuple
(See #4076, thanks @karlseguin) - Fixed
NamedTuple#to_h
does no longer call to value's#clone
(See #4203) - Fixed
Math#gamma
andMath#lgamma
(See #4229, thanks @KCreate) - Fixed
TCPSocket
creation for 0 port for Mac OSX (See #4177, thanks @will) - Fixed repo name extraction from git remote in doc tool (See #4132, thanks @Sija)
- Fixed
self
resolution when including a generic module (See #3972, thanks @makenowjust) - Fixed debug information was missing in some cases (See #4166, #4202, #4254)
- Fixed use generic ARM architecture target triple for all ARM architectures (See #4167, thanks @ysbaddaden)
- Fixed macro run arguments escaping
- Fixed zsh completion (See #4284, thanks @veelenga)
- Fixed honor
--no-color
option in spec (See #4306, thanks @luislavena) - Some bug fixes
0.21.1
- Improved lookup of abstract def implementors (see #4052)
- Improved allocation of objects without pointer instance variables using
malloc_atomic
(see #4081) - Added
crystal --version
reports also the LLVM version (see #4095, thanks @matiasgarciaisaia) - Fixed instance variables initializers corner cases (see #3988)
- Fixed
crystal play
was broken (see #4061) - Fixed
Atomic
can be set tonil
(see #4062) - Fixed
GZip::Header
extra byte (see #4068, thanks @crisward) - Fixed
ASTNode#to_s
forAttribute
(see #4098, thanks @olbat) - Some bug fixes
0.21.0
- (breaking-change) The compiler now reuses previous macro run compilations so
{{ run(...) }}
is only re-run if the code changes - (breaking-change) Spec:
assert { ... }
is nowit { ... }
(thanks @TheLonelyGhost) - (breaking-change) Renamed
Set#merge!
toSet#concat
- (breaking-change)
Zlib
was split intoFlate
,Gzip
andZlib
(bda40f) - (breaking-change)
Crypto::MD5
is nowDigest::MD5
- (breaking-change)
String#chop
is nowString#rchop
- (breaking-change)
String#to_slice
now returns a read-only Slice - (breaking-change)
String
can now hold invalid UTF-8 byte sequences, and they produce a unicode replacement character when traversed - (breaking-change) Removed
String#lchomp
. UseString#lchop
- (breaking-change) Octal escapes inside strings incorrectly produced a codepoint value instead of a byte value
- (breaking-change) Removed octal escape from char literals
- Fixed compiler performance regression related to cached files (f69e37e)
- Added
\xHH
escape sequence in string literals Char::Reader
can now traverse a string backwardsEnum#to_s
now uses pipes instead of commas for flag enumsIO#read_string
is now encoding-awareOAuth2::Client
now sendsapplication/json
Accept header, and considers theexpires_in
access token property as optionalSlice
can now be read-onlyTCPServer
no longer set SO_REUSEPORT to true by default- Added
HTTP::Multipart
andHTTP::FormData
(thanks @RX14) - Added
File::Stat#pipe?
- Added
File.utime
- Added
IO#peek
- Added
String#strip(arg)
,String#lstrip(arg)
,String#rstrip(arg)
- Added
String#lchop
,String#lchop(prefix)
,String#rchop
andString#rchop(suffix)
- Added
String#hexbytes
andString#hexbytes?
- Added
String#scrub
andString#valid_encoding?
- Added
includes?
macro method for StringLiteral, SymbolLiteral and MacroId (thanks @karlseguin) - Added "view source" links to GitLab (thanks @ezrast)
- Updated CONTRIBUTING.md guidelines
- Some bug fixes