From: Tim Becker Date: 2007-04-25T22:16:24+09:00 Subject: Re: C++ code into Ruby, I need it fast, no time for RTFM > We can show you how to do this in Ruby, > which might be surprisingly different from > a line-by-line translation of the code you posted. But line by line is more fun: void p_string(int n, int v[]) Throw out return type, argument type and give the method a rubyesque name: def chunky_chunky_bacon(chunky, bacon) { lose the burly bracket. int i; get rid of the local declaration. cout<<"\nThe string is : "; cout is called STDOUT, you don't need semicolons, and the string you're printing isn't ruby enough; STDOUT << "\nWelcome to the madhouse :" for(i=0;i > s > >