Thanks to explain.

At Sat, 22 Dec 2001 15:55:12 +0900,
HarryO <harryo / zipworld.com.au> wrote:
> >> Dir.entries(X).each do |f|
> >>   (n = f.dup).downcase! and File.rename(File.join(X, f), File.join(X,
> >>   n))
> >> end
> >>
> > okey I don't understand the "!" part why do u have it
> 
> In Ruby, methods that modify an object, as opposed to returning
> a new version of an object with the requested change, tend to
> end with '!'.

And it uses the fact that String#downcase! returns nil if no
change occurred, to rename only files which contain upper
cases.


Nobu Nakada