Ruby 2.6.0-rc2 has been released and the stable should be around the corner.
This is a nice post going over some of the new stuff.
Any thoughts here?
Ruby 2.6.0-rc2 has been released and the stable should be around the corner.
This is a nice post going over some of the new stuff.
Any thoughts here?
For further actions, you may consider blocking this person and/or reporting abuse
Pimp My Ruby -
Jagroop Singh -
Lucas Chitolina -
Balraj Singh -
Top comments (6)
Yes to union, the new merge reminds me of
Object.assign
in JS, not psyched about the breaking change and this feature here seems unnecessary and confusing:Did we really need an operator to invert the order of composition of anonymous functions? 🧐
Why not simply invert the functions?
The thing I find more interesting is not mentioned in the article, the preview JIT compiler. It's not enabled by default but it could speed up long lived processes like web apps. It's described on ruby-lang.org -> Ruby 2.6.0-rc2 Released
From the linked article, this is classic Ruby:
non-ASCII constant names}
Constant names can now start with non-ASCII capital letters. I am not sure how useful this is, but you can do funny things like:
😄
Well, in theory you're supposed to have tests so failing tests should start breaking. But yeah, it's going to take work from some gem authors. The good thing is that the change has been in Ruby trunk for seven months so people might have already started fixing their code.
In their defense, Rubysts were relying on the wrong behavior on a feature badly implemented. See the issue on the bug tracker.
I don't know about the example you made, I don't think I've ever used the case statement :-D
Yeah, true that, they should have put warning signs everywhere for 2.6 and maybe fixed it in 2.7 (or Ruby 3?).
I agree you shouldn't test core functionalities but if something that returns true suddenly returns false some tests will break. If they don't maybe they're not writing the right tests.
I feel like a maintainer of a gem should keep an eye on the changelog of the language the library is written on. At least to check if there are new features that one can take advantage of.
Anyhow, I don't like either but I don't think it's an insane idea. There's no right time to fix a bad behavior people built their libraries on, unfortunately
🙃