All Versions
118
Latest Version
Avg Release Cycle
46 days
Latest Release
331 days ago
Changelog History
Page 5
Changelog History
Page 5
-
v0.23.1 Changes
July 01, 2017- โ Added
Random::PCG32
generator (See #4536, thanks @konovod) - โฌ๏ธ WebSocket should compare "Upgrade" header value with case insensitive (See #4617, thanks @MakeNowJust)
- ๐ Fixed macro lookup from included module (See #4639, thanks @asterite)
- ๐ Explained "crystal tool expand" in crystal(1) man page (See #4643, thanks @MakeNowJust)
- ๐ Explained how to detect end of file in
IO
(See #4661, thanks @oprypin)
- โ Added
-
v0.23.0 Changes
June 27, 2017- (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) - โ Added
unlink
toXML::Node
(See #4515, #4331, thanks @RX14 and @MrSorcus) - โ Added
Math.frexp
(See #4560, thanks @akzhan) - โ Added
Regex::MatchData
support for negative indexes (See #4566, thanks @MakeNowJust) - Added
captures
,named_captures
,to_a
andto_h
toRegex::MatchData
(See #3783, thanks @MakeNowJust) - โ Added
|
as a string delimiter to allowq|string|
syntax (See #3467, thanks @RX14) - โ Added support for Windows linker (See #4491, thanks @RX14)
- โ Added llvm operand bundle def and catch pad/ret/switch in order to support Windows SEH (See #4501, thanks @bcardiff)
- โ Added
Float::Printer
based on Grisu3 to speed up float to string conversion (See #4333, thanks @will) - โ Added
Object.unsafe_as
to unsafely reinterpret the bytes of an object as being of anothertype
(See #4333, thanks @asterite) - โ Added
.downcase(Unicode::CaseOptions::Fold)
option which convert strings to casefolded strings for caseless matching (See #4512, thanks @akzhan) - โ Added
OpenSSL::DigestIO
to wrap an IO while calculating a digest (See #4260, thanks @spalladino) - โ Added
zero?
to numbers and time spans (See #4026, thanks @jellymann) - โ Added
TypeNode#has_method?
method (See #4474, thanks @Sija) - ๐
Regex::MatchData#size
renamed to#group_size
(See #4565, thanks @MakeNowJust) - ๐
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)
- ๐ Documentation about constructor methods now rendered separately (See #4216, thanks @Sija)
- ๐ Turn
Random::System
into a module (See #4542, thanks @oprypin) - ๐
Regex::MatchData
pretty printed (See #4574, thanks @MakeNowJust) - ๐
String.underscore
treats digits as downcase or upcase characters depending previous characters (See #4280, thanks @MakeNowJust) - ๐จ Refactor time platform specific implementation (See #4502, thanks @bcardiff)
- ๐ 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)
- ๐ Fixed
IO::FileDescriptor#seek
from current position (See #4558, thanks @ysbaddaden) - Fixed
IO::Memory#gets_to_end
to consume theIO
(See #4415, thanks @jhass) - ๐ Fixed setting of XML attributes (See #4562, thanks @asterite)
- ๐ Fixed "SSL_shutdown: Operation now in progress" error by retrying (See #3168, thanks @akzhan)
- ๐ Fixed WebSocket negotiation (See #4386, thanks @RX14)
- (breaking-change)
-
v0.22.0 Changes
April 20, 2017- (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
- (breaking-change) Removed
-
v0.21.1 Changes
March 06, 2017- ๐ 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
-
v0.21.0 Changes
February 20, 2017- (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-only- 0๏ธโฃ
TCPServer
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
include?
macro method for StringLiteral, SymbolLiteral and MacroId (thanks @karlseguin) - โ Added "view source" links to GitLab (thanks @ezrast)
- โก๏ธ Updated CONTRIBUTING.md guidelines
- ๐ Some bug fixes
- (breaking-change) The compiler now reuses previous macro run compilations so
-
v0.20.5 Changes
January 20, 2017- ๐ Improved performance in
String#index
,String#rindex
due to Rabin-Karp algorithm (thanks @MakeNowJust). - ๐ Improved performance in
Crypto::Bcrypt
(see #3880, thanks @ysbaddaden). - ๐ป
expect_raises
returns raised exception (thanks @kostya). - ๐ Line numbers debug information is always generated (see #3831, thanks @ysbaddaden).
- โ Added
Zip::File
,Zip::Reader
andZip::Writer
. Native readers for zip files that delegate compression to existing zlib module. - โ Added
Hash#delete
with block (see #3856, thanks @bmulvihill). - โ Added
String#[](char : Char)
(see #3855, thanks @Sija). - โ Added
crystal tool expand
to expand macro call in a given location (see #3732, thanks @MakeNowJust). - ๐ Fixed
crystal play
is able to show compilation errors again. crystal doc
recognizescrystal-lang/crystal
in any remote (thanks @MaxLap).- ๐ Some bug fixes
- ๐ Improved performance in
-
v0.20.4 Changes
January 06, 2017- (breaking change) A type that wants to convert itself to JSON now must override
to_json(builder : JSON::Builder)
instead ofto_json(io : IO)
. The same is true for custom JSON converters. If you are usingJSON.mapping
then your code will continue to work without changes. - (breaking change) Defining a
finalize
method on a struct now gives a compile error - (breaking change) Default argument types now must match their restriction, if any (for example
def foo(x : Int32 = nil)
will now fail to compile iffoo
is invoked without arguments) (thanks @MakeNowJust) - (breaking change)
each
methods now returnNil
- (breaking change)
IO#skip(bytes)
will now raise if there aren't at least the given amount of bytes in theIO
(previously it would work well if there were less bytes, and it would hang if there were more) - (breaking change)
MemoryIO
was removed (useIO::Memory
instead) - (breaking change)
Number#step
now requires named arguments,to
andby
, to avoid argument order confusion - (breaking change)
YAML::Emitter
was renamed toYAML::Builder
, and some of its methods were also renamed - (breaking change)
XML::Node#[]
now always returns aString
(previously it could also returnNil
, which was incorrect) - (breaking change)
XML::Node#content
now returns an emptyString
when no content is available HTTP::Client
now automatically reconnects on a dropped keep-alive connectionwith ... yield
now works well withmethod_missing
- Class variables can now be used in generic types (all generic instances share the same variable, and subclasses get their own copy, as usual)
- โ Added support for LLVM 4 (thanks @ysbaddaden)
- โ Added
Enum.each
andEnum#each
(thanks @ysbaddaden) - โ Added
Hash#compact
andHash#compact!
(thanks @MakeNowJust) - โ Added
IO#read_string(bytesize)
- Added
IO#skip_to_end
- โ Added
Iterator#flat_map
(thanks @MakeNowJust) - โ Added
JSON.build
andJSON::Builder
- โ Added
NamedTuple#has_key?(String)
(thanks @Sija) - โ Added
p(NamedTuple)
(thanks @splattael) - โ Added
Regex::MatchData#==
(thanks @MakeNowJust) - โ Added
String#sub(Regex, NamedTuple)
(thanks @maiha) - โ Added
XML.build
andXML::Builder
- Lots of improvements and applied consistencies to doc comments (thanks @Sija and @maiha)
- ๐ Some bug fixes
- (breaking change) A type that wants to convert itself to JSON now must override
-
v0.20.3 Changes
December 23, 2016- (breaking change)
IO#gets
,IO#each_line
,String#lines
,String#each_line
, etc. now chomp lines by default. You can passchomp: false
to prevent automatic chomping. Note thatchomp
istrue
by default for arglessIO#gets
(read line) butfalse
if args are given. - (breaking change)
HTTP::Handler
is now a module instead of a class (thanks @andrewhamon) - (breaking change) Free variables now must be specified with
forall
, a single uppercase letter will not work anymore - (breaking change) The
libs
directory is no longer in the default CRYSTAL_PATH, uselib
(runningcrystal deps
should fix this) - โก๏ธ Optimized compile times, specially on linux
private
can now be used with macros inside types (thanks @MakeNowJust)- CLI: the
-s
/--stats
option now also shows execution time (thanks @MakeNowJust) - CLI: added
-t
/--time
to show execution time (thanks @MakeNowJust) Socket
now allows any family/type/protocol association, and many other improvements (thanks @ysbaddaden)- YAML: an
IO
can now be passed tofrom_yaml
(thanks @MakeNowJust) - Added
class_getter
,class_setter
,class_property
, etc. (thanks @Sija) - โ Added
String#lchomp
(thanks @Sija) - โ Added
IO#read_fully?
- โ Added
Iterator#flatten
(thanks @MakeNowJust) - Added
HTTP::WebSocket#ping
,pong
,on_ping
,on_pong
, and now a ping message is automatically replied with a pong message (thanks @Sija) - โ Added
File#empty?
andDir#empty?
(thanks @dylandrop) - โ Added
Time::Span#/(Time::Span)
(thanks @RX14) - โ Added
String#split
versions that accept a block (thanks @splattael) - โ Added
URI#normalize
andnormalize!
(thanks @taylorfinnell) - โ Added
reuse
optional argument to manyArray
,Enumerable
andIterable
methods that allow you to reuse the yielded/return array for better performance and less memory footprint - The
:debug
flag is now present when compiled with--debug
, useful for doingflag?(:debug)
in macros (thanks @luislavena) - ๐ Many bug fixes and performance improvements
- (breaking change)
-
v0.20.1 Changes
December 05, 2016- (breaking change)
Set#merge
as renamed toSet#merge!
- (breaking change)
Slice.new(size)
no longer works with non primitive integers and floats - (breaking change) The macro method
argify
was renamed tosplat
- โ Added pretty printing. The methods
p
andpp
now use it. To get the old behaviour useputs obj.inspect
- โ Added
ArrayLiteral#[]=
,TypeNode#constant
,TypeNode#overrides?
andHashLiteral#double_splat
in macros - โ Added a
finished
macro hook that runs at the end of the program - โ Added support for declaring the type of a local variable
- โ Added
Slice.empty
- Flags enums now have a
none?
method IO::ByteFormat
has now methods to encode/decode to/from aSlice
- Spec: the line number passed to run a specific
it
block can now be inside any line of that block - The
CallConvention
attribute can now also be applied to alib
declaration, and allfun
s inside it will inherit it - The
method_missing
hook can now define a method, useful for specifying block arguments - ๐ Support double splat in macros (
{{**...}}
) - ๐ Some bug fixes
- (breaking change)
-
v0.20.0 Changes
November 22, 2016- (breaking change) Removed
ifdef
from the language - (breaking change) Removed
PointerIO
- (breaking change) The
body
property ofHTTP::Request
is now anIO?
(previously it wasString
). Userequest.body.try(&.gets_to_end)
if you need the entire body as a String. - (breaking change)
MemoryIO
has been renamed toIO::Memory
. The old name can still be used but will produce a compile-time warning.MemoryIO
will be removed immediately after 0.20.0. - (breaking change)
Char#digit?
was split intoChar#ascii_number?
andChar#number?
. The old name is still available and will produce a compile-time warning, but will be removed immediately after 0.20.0. - (breaking change)
Char#alpha?
was split intoChar#ascii_letter?
andChar#letter?
. The old name is still available and will produce a compile-time warning, but will be removed immediately after 0.20.0. - (breaking change) The
Iterable
module is now generic - Many
String
andChar
methods are now unicode-aware, for exampleString#downcase
,String#upcase
,Char#downcase
,Char#upcase
,Char#whitespace?
, etc. - โ Added support for HTTP client and server streaming.
- โ Added support for ARM (thanks @ysbaddaden)
- โ Added support for AArch64 (thanks @ysbaddaden)
- โ Added support for LLVM 3.9 (thanks @ysbaddaden)
- Added
__END_LINE__
magic constant in method default arguments: will be the last line of a call (if the call has a block, it will be the last line of that block) - โ Added
@def
inside macros that takes the value of the current method - ๐ API docs have a nicer style now, and notes like TODO and DEPRECATED are better highlighted (thanks @samueleaton)
- ๐ Slight improvement to debugging support (thanks @ggiraldez)
- ๐ง Line numbers in backtraces (linux only for now) (thanks @ysbaddaden)
- โ Added iteration times to
Benchmark.ips
(thanks @RX14) - ๐ Allow
HTTP::Client
block initializer to be used when passing an URI (thanks @philnash) JSON.mapping
andYAML.mapping
getter/setter generation can now be controlled (thanks @zatherz)Time
is now serializable to JSON and YAML using ISO 8601 date-time format- โ Added
IO::MultiWriter
(thanks @RX14) - โ Added
String#index(Regex)
andString#rindex(Regex)
(thanks @zatherz) - โ Added
String#partition
andString#rpartition
(thanks @johnjansen) - Added
FileUtils.cd
,FileUtils.mkdir
,FileUtils.mkdir_p
,FileUtils.mv
,FileUtils.pwd
,FileUtils.rm
,FileUtils.rm_r
,FileUtils.rmdir
(thanks @ghivert) - โ Added
JSON::Builder#raw_field
(thanks @kostya) - โ Added
Enumerable#chunks
andIterator#chunk
(thanks @kostya) - โ Added
Iterator#with_index
- Several enhancements to the Random module: now works for any integer type and avoids overflows (thanks @BlaXpirit)
- โก๏ธ Optimized
Array#sort
by using introsort (thanks @c910335) - ๐ Several bug fixes
- (breaking change) Removed