"Dave Thomas" <Dave / thomases.com> wrote in message news:m2aeggoqi4.fsf / zip.local.thomases.com... > > > Andy and I were surprised by a Ruby feature. If you'd like, answer the > following three questions without executing the code, then try it in > Ruby and see if you were right. > > a = "hi" > p a[0,1] #=> "h" > p a[1,1] #=> ? > p a[2,1] #=> ? > p a[3,1] #=> ? > > Anyone else surprised? Uh, it's the difference between p a[0] and p a[0,1] that surprises me. Particularly, the use of a[0] to refer to an ordinal, and a[0,1] to refer to a literal, if I might say, that is what is extremely weird to me. Warren