Hello,

I know that this has been covered a bit here:
http://www.ruby-forum.com/topic/186437 but I'm still not certain that I
understand.

s = "foo"

s[3] is nil, like I would expect.

s[3,0] is "", instead of nil.
s[4,0] is finally nil.

I don't understand how I'm indexing '3' in the context of [3,0] and
getting anything but nil.
Since s[3] is already nil in the first place.

Same for arrays:

a = [:one, :two]

a[2] is nil
a[2,0] is an empty array ??
a[3,0] is finally nil though.

I understand that in the docs these are special cases and they're not
preventing me from working or anything like that.  I am just curious to
understand the why/how about them working this way.

Thank you!

-- 
Posted via http://www.ruby-forum.com/.