From: Peter Szinek Date: 2007-11-21T19:22:59+09:00 Subject: Re: porting java methods to ruby Robert Klemme wrote: > 2007/11/21, Peter Szinek : >> Hi, >> >>> public char[] getTextCharacters(int [] holderForStartAndLength) >>> { >>> } > > This won't even compile because there is no "return" statement. Also, > using an array to pass two values is at best sub optimal. And since > you do not provide any details about the class at hand nobody can > really help you. > >>> Could any one help me to do the same in ruby >> Oh sure! >> >> def getTextCharacters(holder_for_start_and_length) >> end > > LOL > > Actually, we can make this even *more* rubyish: > > def get_text_characters holder_for_start_and_length > end Ah, thanks Robert :-) The most trivial tasks are the easiest to screw up, right? ___ http://www.rubyrailways.com http://scrubyt.org