From: Tobias Reif Date: 2002-03-22T17:44:20+09:00 Subject: Re: camelCase and underscore_style Bil Kleb wrote: > Right. For example, if I wanted to change all occurances of > reynolds_number to reynoldsNumber in all the .rb files in > the current directory, I'd issue > > ruby -pi -e"gsub(/reynolds_number/,'reynoldsNumber')" *.rb So if I wanted to change all underscore to camelCase, the line could look something like ruby -pi -e "gsub /_./ do $&[1].chr.upcase end" *.rb (the above is too simple, and highly unsafe) Then, def foo_bar_baz would be changed to def fooBarBaz AFAICS. Tobi -- * peace&love. * http://www.pinkjuice.com/