Skip to content
GitHub Repository Forum RSS-Newsfeed

Crystal 1.4.1 is released!

We are releasing the first patch release of the 1.4 series.

Pre-built packages are available on GitHub Releases and our official distribution channels. See crystal-lang.org/install for installation instructions.

Stats

In this patch release we included 5 PRs since the 1.4.0 release by 4 contributors. We thank all the effort put into improving the language! ❤️

Remarkable changes

Prior to 1.4.0, the following code will raise at runtime an illegal access error:

module M
  @a = 'a'
end

class A
  @a = 'b'
end

class B < A
  include M

  @c = true
end

As a quick workaround, in 1.4.0 we disabled the possibility to define an instance variable in a class and an included module. The same code will then throw an error at compile time: Error: instance variable 'a' of B is already defined in A.

However, as it turned out, in some cases it was possible to define the same instance variable in a class and in an including module: if B above weren’t defining its own instance variable (@c), then that code runs fine in Crystal 1.3.2. In #11995 this was fixed for good, and now instance variables having compatible types are allowed to be defined in a class and an including module.

For more details of this and other bug fixes included in this release, please visit the changelog.

Thanks

We have been able to do all of this thanks to the continued support of 84codes, Nikola Motor Company and every other sponsor. To maintain and increase the development pace, donations and sponsorships are essential. OpenCollective is available for that.

Reach out to crystal@manas.tech if you’d like to become a direct sponsor or find other ways to support Crystal. We thank you in advance!

Contribute