How to find out if Array has value or emtpy

def java_process_up()

        process_id=`ps -ef | grep -v grep | grep java | awk '{print
$2}'`
        return process_id

end

process_array = Array.new
process_array = java_process_up()
if process_array.nil?
puts "Array is full"
else
puts "Array is null"
end

but this does not work

how to find out if array has value or not ??

Thanks

···

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

Try this in your terminal:

$ ri Array

Alternatively check out the online documentation of Ruby's standard
library and core.

Kind regards

robert

···

On Sun, Sep 2, 2012 at 4:14 PM, Fosiul Alam <lists@ruby-forum.com> wrote:

how to find out if array has value or not ??

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/