From: Drew Olson Date: 2007-07-03T05:48:24+09:00 Subject: Re: de-camelcase a filename Aaron Smith wrote: > how can a take a string file name like MyTestCase.rb and change it to > my_test_case.rb? > > thanks Possibly overkill, but you can use ActiveSupport, it has this functionality built in: irb(main):001:0> require 'rubygems' => true irb(main):002:0> require 'active_support' => true irb(main):003:0> "ThisIsATest".underscore => "this_is_a_test" -- Posted via http://www.ruby-forum.com/.