From: nobu.nokada@... Date: 2001-12-22T17:20:02+09:00 Subject: [ruby-talk:29300] Re: upper case to lower Thanks to explain. At Sat, 22 Dec 2001 15:55:12 +0900, HarryO 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