From: "kddnewton (Kevin Newton) via ruby-core" Date: 2023-09-13T00:59:39+00:00 Subject: [ruby-core:114709] [Ruby master Bug#19876] Equality chaining Issue #19876 has been updated by kddnewton (Kevin Newton). Status changed from Open to Closed Okay. I will make this behavior match. ---------------------------------------- Bug #19876: Equality chaining https://bugs.ruby-lang.org/issues/19876#change-104543 * Author: kddnewton (Kevin Newton) * Status: Closed * 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/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/