At 2009-09-01 07:12AM, "Arul hari" wrote:
>  Dear Friends,
>            If there any pre-defined function or ruby options available
>  for removing the ruby comments from the source code. Please any on help
>  me if you already aware of this.

The ruby_parser and ruby2ruby gems will do this:

    require 'ruby_parser'
    require 'ruby2ruby'

    code = <<END
    # a class
    class Simple
      # add the method "add"
      def add(n1,n2)
        n1 + n2  # return the sum
      end
    end
    END

    parsed = Ruby2Ruby.new.process( RubyParser.new.process( code ))

    puts parsed

results in:

    class Simple
      def add(n1, n2)
        (n1 + n2)
      end
    end


-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous