From: Sam Roberts Date: 2004-03-29T07:24:53+09:00 Subject: Re: [newbie] What is String#dump for? Quoteing alex_verk@mail.ru, on Mon, Mar 29, 2004 at 07:02:08AM +0900: > Given that I can rewrite your "usage example" like this: > > _="puts'_='+_.dump+';'+_";puts'_='+_.dump+';'+_ > > , String#dump must be the same thing as String#inspect, and has nothing to do with marshalling. Correct? > > I would still appreciate some reallife usage. I can vaguely imagine > using it to insert any given string into a regexp or as an argument to ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > a generated Ruby script. Is that the purpose, or something else? Yes, that is one important use, though you could use it for other things. Sam