All Versions
118
Latest Version
Avg Release Cycle
46 days
Latest Release
331 days ago

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)
  • v0.23.0 Changes

    June 27, 2017
    • (breaking-change) Logger#formatter takes a Severity instead of a String (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 and quote_char to CSV#each_row (See #4448, thanks @timsu)
    • Added map_with_index! to Pointer, Array and StaticArray (See #4456, #3356, #3354, thanks @Nephos)
    • โž• Added headers parameter to HTTP::WebSocket constructors (See #4227, #4222, thanks @adamtrilling)
    • โž• Added unlink to XML::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 and to_h to Regex::MatchData (See #3783, thanks @MakeNowJust)
    • โž• Added | as a string delimiter to allow q|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 another type (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 for crystal 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 the IO (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)
  • 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 to WeakRef#value (See #4293)
    • (breaking-change) Rename HTTP::Params.from_hash to HTTP::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 and p, 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 and FileUtils.touch methods (See #4069, thanks @Sija)
    • โž• Added #values_at for CSV (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 when Iterator.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 empty NamedTuple (See #4076, thanks @karlseguin)
    • ๐Ÿ›  Fixed NamedTuple#to_h does no longer call to value's #clone (See #4203)
    • ๐Ÿ›  Fixed Math#gamma and Math#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
  • 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 to nil (see #4062)
    • ๐Ÿ›  Fixed GZip::Header extra byte (see #4068, thanks @crisward)
    • ๐Ÿ›  Fixed ASTNode#to_s for Attribute (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 now it { ... } (thanks @TheLonelyGhost)
    • (breaking-change) Renamed Set#merge! to Set#concat
    • (breaking-change) Zlib was split into Flate, Gzip and Zlib (bda40f)
    • (breaking-change) Crypto::MD5 is now Digest::MD5
    • (breaking-change) String#chop is now String#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. Use String#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 backwards
    • Enum#to_s now uses pipes instead of commas for flag enums
    • IO#read_string is now encoding-aware
    • OAuth2::Client now sends application/json Accept header, and considers the expires_in access token property as optional
    • Slice can now be read-only
    • 0๏ธโƒฃ TCPServer no longer set SO_REUSEPORT to true by default
    • โž• Added HTTP::Multipart and HTTP::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 and String#rchop(suffix)
    • โž• Added String#hexbytes and String#hexbytes?
    • โž• Added String#scrub and String#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
  • 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 and Zip::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 recognizes crystal-lang/crystal in any remote (thanks @MaxLap).
    • ๐Ÿ›  Some bug fixes
  • 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 of to_json(io : IO). The same is true for custom JSON converters. If you are using JSON.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 if foo is invoked without arguments) (thanks @MakeNowJust)
    • (breaking change) each methods now return Nil
    • (breaking change) IO#skip(bytes) will now raise if there aren't at least the given amount of bytes in the IO (previously it would work well if there were less bytes, and it would hang if there were more)
    • (breaking change) MemoryIO was removed (use IO::Memory instead)
    • (breaking change) Number#step now requires named arguments, to and by, to avoid argument order confusion
    • (breaking change) YAML::Emitter was renamed to YAML::Builder, and some of its methods were also renamed
    • (breaking change) XML::Node#[] now always returns a String (previously it could also return Nil, which was incorrect)
    • (breaking change) XML::Node#content now returns an empty String when no content is available
    • HTTP::Client now automatically reconnects on a dropped keep-alive connection
    • with ... yield now works well with method_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 and Enum#each (thanks @ysbaddaden)
    • โž• Added Hash#compact and Hash#compact! (thanks @MakeNowJust)
    • โž• Added IO#read_string(bytesize)
    • Added IO#skip_to_end
    • โž• Added Iterator#flat_map (thanks @MakeNowJust)
    • โž• Added JSON.build and JSON::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 and XML::Builder
    • Lots of improvements and applied consistencies to doc comments (thanks @Sija and @maiha)
    • ๐Ÿ›  Some bug fixes
  • 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 pass chomp: false to prevent automatic chomping. Note that chomp is true by default for argless IO#gets (read line) but false 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, use lib (running crystal 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 to from_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? and Dir#empty? (thanks @dylandrop)
    • โž• Added Time::Span#/(Time::Span) (thanks @RX14)
    • โž• Added String#split versions that accept a block (thanks @splattael)
    • โž• Added URI#normalize and normalize! (thanks @taylorfinnell)
    • โž• Added reuse optional argument to many Array, Enumerable and Iterable 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 doing flag?(:debug) in macros (thanks @luislavena)
    • ๐ŸŽ Many bug fixes and performance improvements
  • v0.20.1 Changes

    December 05, 2016
    • (breaking change) Set#merge as renamed to Set#merge!
    • (breaking change) Slice.new(size) no longer works with non primitive integers and floats
    • (breaking change) The macro method argify was renamed to splat
    • โž• Added pretty printing. The methods p and pp now use it. To get the old behaviour use puts obj.inspect
    • โž• Added ArrayLiteral#[]=, TypeNode#constant, TypeNode#overrides? and HashLiteral#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 a Slice
    • 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 a lib declaration, and all funs 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
  • v0.20.0 Changes

    November 22, 2016
    • (breaking change) Removed ifdef from the language
    • (breaking change) Removed PointerIO
    • (breaking change) The body property of HTTP::Request is now an IO? (previously it was String). Use request.body.try(&.gets_to_end) if you need the entire body as a String.
    • (breaking change) MemoryIO has been renamed to IO::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 into Char#ascii_number? and Char#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 into Char#ascii_letter? and Char#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 and Char methods are now unicode-aware, for example String#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 and YAML.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) and String#rindex(Regex) (thanks @zatherz)
    • โž• Added String#partition and String#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 and Iterator#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