ruby list building | Sololearn: Learn to code for FREE!

+1

ruby list building

Just wondering about x..y vs x...y What is the intuition, how do I avoid confusion?

12/17/2018 10:39:17 PM

ChSp

2 Answers

New Answer

+2

Checking this again could help you https://www.sololearn.com/learn/Ruby/2717/

+1

Seniru Pasan , that doesn't really relate to my question. I wasn't asking about the Syntax but about the Semantics. Why is 2.. 4 equal to 2,3,4 while 2...4 is equal to 2,3? As the more commonly used I would expect the latter to be the shorter, but no. Is there some intuition behind the notation, maybe a historic reason? Google doesn't really help...