
Issue #19876 has been reported by kddnewton (Kevin Newton). ---------------------------------------- Bug #19876: Equality chaining https://bugs.ruby-lang.org/issues/19876 * Author: kddnewton (Kevin Newton) * Status: Open * Priority: Normal * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- It appears that you cannot chain `==`, `!=`, `<=>`, `=~`, `!~`, `===`: ``` ruby foo == bar == baz ``` but you can chain all of the other operators: ``` ruby 1 << 2 << 3 ``` I'm not sure if I've missed some. I would just like to know if this is a bug. If it's not, then I need to know which operators cannot be chained. At the moment all of these can be chained in YARP, but if it's desired behavior that that is a syntax error, I need to explicitly disallow this. -- https://bugs.ruby-lang.org/