extra slash in current path

yuyichao-mit <[email protected]> Thu, 23 Jun 2011 09:14:18 -0400
Newsgroups org.kernel.vger.linux-c-programming,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
The problem is like this:

$ cd /
$ pwd
/

$ cd /
$ pwd
//

$ cd ///
$ pwd
/

Why can there be a extra slash (and exactly one) in current path? Is
this designed on purpose?
This is not really a big deal but I think it can confuse some program.

Thanks.

Yichao