plt/racket — pull request #528 by thinkmoore (2013-12-20 22:53:45+00:00)
Title: path-element? should disallow '.' and '..'

The implementation of `path-element?` does not match the documentation.

This patch fixes `path-element?` to check whether the name returned by split-path
is a path or a special entry. This behavior matches both the documentation
of `path-element?` and the implementation of `string->path-element`.
It might be better to use a less expensive check, but I wasn't sure.

If allowing special entries is the intended behavior, the documentation should be
changed instead and conversion functions like string->path-element should be
changed to match. The current behavior differs between them:
```
> (path-element? (string->path "."))
#t
> (string->path-element ".")
string->path-element: cannot be converted to a path element
path: "."
explanation: path can be split, is not relative, or names a special element
```