Releases
1.1.0
1.1.0 (2021-07-14)
Language changes
Macros
Standard library
Global changes
Windows support
Port Socket::Address
to win32 . (#10610 , thanks @straight-shoota )
Port Socket::Addrinfo
to win32. (#10650 , thanks @straight-shoota )
Extract system-specifics from Socket. (#10706 , thanks @straight-shoota )
Make WinError
portable and add it to prelude. (#10725 , thanks @straight-shoota )
Improve portability of SystemError
. (#10726 , thanks @straight-shoota )
Refactor Socket::Addrinfo::Error
based on os_error
. (#10761 , thanks @straight-shoota )
Add WinError.wsa_value
and specs for WinError
. (#10762 , thanks @straight-shoota )
Add specs for Errno
. (#10763 , thanks @straight-shoota )
Refactor: Move win32 libc bindings from winbase.cr
to approriate files. (#10771 , thanks @straight-shoota )
Refactor: Change protocol socket fd to Socket::Handle
. (#10772 , thanks @straight-shoota )
Fix Socket::Connect
error in addrinfo inherit os_error
. (#10782 , thanks @straight-shoota )
Reorganize some win32 libc bindings (#10776 , thanks @straight-shoota )
Type annotations
Add type restriction to private Process
constructor. (#7040 , thanks @z64 )
Add various return type restrictions (thanks @oprypin , @straight-shoota , and @caspiano ):
#10578 , #10579 ,
#10580 , #10581 ,
#10582 , #10583 ,
#10584 , #10585 ,
#10586 , #10587 ,
#10588 , #10849 ,
#10856 , #10857 ,
#10858 , #10905
Add type restrictions for splat-less overloads of some methods. (#10594 , thanks @HertzDevil )
Numeric
Add Number.new
overload for String
. (#10422 , thanks @Blacksmoke16 )
Fix Math.pw2ceil
for zero and 64-bit integers. (#10555 , thanks @straight-shoota )
Add #positive?
& #negative?
to Number
and Time::Span
. (#10601 , thanks @Blacksmoke16 )
Fix imprecise Number#significant
algorithm. (#10615 , thanks @straight-shoota )
Add BigFloat
's rounding modes. (#10618 , thanks @HertzDevil )
Fix handling of arithmetic overflow in BigDecimal#div
. (#10628 , thanks @kellydanma )
Clarify behaviour of unsafe Float
-to-number conversions. (#10631 , thanks @HertzDevil )
Fix return type restriction for Number#humanize
overload. (#10633 , thanks @HertzDevil )
Fix printf
float with with many digits. (#10719 , thanks @straight-shoota )
Add BigDecimal
's missing rounding modes. (#10798 , thanks @HertzDevil )
Add support for using big rational #**
with unsigned ints. (#10887 , thanks @stakach )
Add overflow detection to BigFloat#to_i64
and #to_u64
. (#10630 , thanks @HertzDevil )
Text
Collections
Add sub/superset checking methods to Hash
. (#7500 , thanks @Sija )
Improve documentation of Array#[](Range)
. (#10243 , thanks @straight-shoota )
Add Steppable
module as generalized Number#step
. (#10279 , thanks @straight-shoota )
Add docs for #map_with_index
. (#10512 , thanks @wontruefree)
Add Array#truncate
. (#10712 , thanks @HertzDevil )
Fix: Always copy Hash
's default block on #dup
and #clone
. (#10744 , thanks @HertzDevil )
Apply Array#push
's resizing heuristic to #unshift
. (#10750 , thanks @HertzDevil )
Refactor index / count normalization in range-like methods. (#10753 , thanks @HertzDevil )
Add methods for cumulative folding and prefix sums. (#10789 , thanks @HertzDevil )
Fix: Pass read-only flag to peeked slice in IO::Memory
. (#10891 , thanks @z64 )
Crypto
Time
Files
Fibers
Networking
Add an example middleware for remote_address
. (#10408 , thanks @oprypin )
Add OAuth2::Client#http_client
. (#10452 , thanks @straight-shoota )
Fix undefined constant error for http/params
. (#10537 , thanks @stakach )
Fix looping forever at 100% CPU if socket is closed. (#10658 , thanks @didactic-drunk )
Fix documentation of HTTP::Cookies#[]=
empty path. (#10669 , thanks @straight-shoota )
Fix handling of EAI_SYSTEM
for getaddrinfo
. (#10757 , thanks @straight-shoota )
(performance) Cache socket.local_address
and socket.remote_address
. (#10765 , thanks @lbguilherme )
Fix: IO::ARGF#read
should always return i32
. (#10828 , thanks @stakach )
Fix HTTP::Cookie
parse quoted cookie value. (#10853 , thanks @straight-shoota )
Add Socket::Addrinfo#inspect
(#10775 , thanks @straight-shoota )
System
Runtime
Serialization
Specs
Compiler
Add support for type var splats inside Tuple
during generic parameter substitution. (#10232 , thanks @HertzDevil )
Fix: consider free vars in parameters of abstract def implementations before existing types, in particular fixing the creation of empty types. (#10503 , thanks @HertzDevil )
Fix variance checks between generic instances for Proc#call
and abstract defs. (#10507 , #10899 , thanks @HertzDevil )
Fix error message when default parameter value doesn't match non-type restriction. (#10515 , thanks @HertzDevil )
Fix type restriction logic for generic module instances. (#10519 , thanks @HertzDevil )
Fix logic for subclass restricted against uninstantiated nested generic superclass. (#10522 , #10560 , thanks @HertzDevil )
Fix: eliminate extraneous types in certain non-commutative unions. (#10527 , thanks @HertzDevil )
Fix: exclude variables' final types inside while true
if re-assigned before first break. (#10538 , thanks @HertzDevil )
Make Pointer(T)#value=
even stricter for generic arguments. (#10553 , thanks @HertzDevil )
Fix body locations for def nodes that have default args . (#10619 , thanks @oprypin )
Fix call nodes' location after transforming its splats. (#10620 , thanks @oprypin )
Fix check_type_allowed_as_proc_argument
to show the type name. (#10688 , thanks @straight-shoota )
Add free variables to "no overload matches" errors. (#10692 , thanks @HertzDevil )
Fix: make virtual unbound types also unbound. (#10704 , thanks @HertzDevil )
Fix: run instance variable initializers on instantiated generic superclasses only. (#10729 , thanks @HertzDevil )
Fix: allow previous_def
to init superclass's non-nilable ivars. (#10733 , thanks @HertzDevil )
Fix: Use only last sub-expression of Expressions
nodes for conditional type filters. (#10738 , thanks @HertzDevil )
Fix: Don't compute type filters inside typeof
's argument. (#10739 , thanks @HertzDevil )
Fix: Devirtualize types in TypeNode#==(other : TypeNode)
and #!=
. (#10742 , thanks @HertzDevil )
Fix exit types of variables assigned inside while
conditions. (#10759 , thanks @HertzDevil )
Fix logic for responds_to?
of generic module instances. (#10760 , thanks @HertzDevil )
Add support for accessing a common value of a union type. (#10770 , thanks @asterite )
Fix subtype relation when generic type variable is a virtual abstract struct. (#10779 , thanks @HertzDevil )
Fix array literals consisting entirely of splat expansions. (#10792 , thanks @HertzDevil )
Fix parsing macro literal containing char literal. (#10799 , thanks @straight-shoota )
Refactor: Use type instead of is_a?
in filters. (#10815 , thanks @caspiano )
Expand named macro expression arguments before outer macro call expansion. (#10819 , thanks @HertzDevil )
Be more strict about printing operator calls as short forms. (#10825 , thanks @HertzDevil )
Fix union logic between metaclasses of uninstantiated generic classes in same hierarchy. (#10832 , thanks @HertzDevil )
Fix uninstantiated generic classes casting to themselves. (#10883 , thanks @HertzDevil )
Allow underscore in block return type even if the type can't be computed (#10933 , thanks @asterite )
Fix parser identifies call with named args as var (#10842 , thanks @straight-shoota )
Tools
Formatter
Doc generator
Fix escaping of argument lists in doc generator, expose JSON. (#10109 , #10821 , thanks @oprypin and @Sija )
Print named generic type arguments of type restrictions in docs. (#10424 , thanks @HertzDevil )
Fix: respect overload order between methods. (#10609 , thanks @HertzDevil )
Fix PropagateDocVisitor
visit macro def. (#10634 , thanks @straight-shoota )
Fix: remove superclass from ASTNode
in API docs. (#10664 , thanks @beta-ziliani )
(breaking-change) Remove deprecated ditto
doc directive. (#10755 , thanks @caspiano )
(Note that it was scheduled for removal since 0.34)
Fix: Restrict macro types' ancestors to ASTNode
. (#10722 , thanks @HertzDevil )
Fix docs generator search use html_id
. (#10875 , thanks @straight-shoota )
Fix --sitemap-priority
, --sitemap-changefreq
. (#10906 , thanks @HertzDevil )
Others
CI: Update to use 1.0.0. (#10533 , thanks @bcardiff )
Bump distribution-scripts. (#10639 , #10673 , #10754 , thanks @straight-shoota and @bcardiff )
Fix contribution instructions. (#10558 , thanks @straight-shoota )
Remove .dockerignore
. (#10642 , thanks @miry )
Add section about pull requests to the contributing guide. (#10683 , thanks @straight-shoota )
Publish nightly builds to OBS. (#10684 , thanks @straight-shoota )
Remove broken travis.yml config from crystal init
. (#10800 , thanks @straight-shoota )
Disable broken test_darwin
job on circleci. (#10823 , thanks @straight-shoota )
Update distribution-scripts for shards 0.15.0. (#10862 , thanks @straight-shoota )
Add smoke tests for platforms where we don't run full tests (#10848 , thanks @straight-shoota )
You canβt perform that action at this time.