Actions
Feature #5899
closed
Updated by Anonymous over 14 years ago
Ondrej Bilka wrote in post #1041080:
Issue #5899 has been reported by Ondrej Bilka.
Feature #5899: chaining comparsions.
https://bugs.ruby-lang.org/issues/5899puts "yes" if 1<2<3<4
+1
--
Posted via http://www.ruby-forum.com/.
Updated by kernigh (George Koehler) over 14 years ago
Updated by naruse (Yui NARUSE) over 14 years ago
- Status changed from Open to Assigned
- Assignee set to matz (Yukihiro Matsumoto)
Updated by matz (Yukihiro Matsumoto) over 14 years ago
- Status changed from Assigned to Feedback
I don't think changing "1 < b < 4" to "1 < b && b < 4" is that hard task.
I am not sure it's worth allowing confusing "false < 4".
Matz.
Updated by mame (Yusuke Endoh) over 13 years ago
- Target version set to 2.6
Updated by sos4nt (Stefan Schüßler) about 10 years ago
Yukihiro Matsumoto wrote:
I don't think changing "
1 < b < 4" to "1 < b && b < 4" is that hard task.
Writing 1 < b && b < 4 is not hard. But doesn't 1 < b < 4 look intriguing? It's so clean!
I would also expect a slight difference, namely that 1 < b < 4 evaluates b once and 1 < b && b < 4 evaluates b twice.
Updated by nobu (Nobuyoshi Nakada) about 10 years ago
- Description updated (diff)
Updated by matz (Yukihiro Matsumoto) about 10 years ago
- Description updated (diff)
I don't think it's worth adding extra complexity to Ruby.
Matz.
Updated by matz (Yukihiro Matsumoto) about 10 years ago
- Status changed from Feedback to Rejected
Updated by nobu (Nobuyoshi Nakada) about 10 years ago
- Description updated (diff)
Actions