Thanks all for brilliant examples.

@Jose: Thanks so much. That was too close.

Jose Calderon-Celis wrote in post #994451:
> #!/usr/bin/env ruby
> #
> require 'rubygems'
>
> puts "ruby #{RUBY_VERSION}"
> s = "This is to test reverse of a string"
> p s
> len=s.length
> mycommand=""
> for j in 1..len do
>   mycommand += s[-1*j]
> end
> p mycommand
> Jose Calderon-Celis
> 5199906-7970
> http://www.tm.com.pe/mensajes/
>
>
>
> 2011/4/22 Rubist Rohit <passionate_programmer / hotmail.com>

-- 
Posted via http://www.ruby-forum.com/.