2008/4/14, Pranjal Jain <pranjal.jain123 / gmail.com>:
> HI all
>  I am facing a small problem in array.
>
>  I am placing the values of the select list in an array. Now I want to
>  check if any  of the values in the array is greater then  the "0.0" .

Assuming > 0 means error:

raise "Invalid positive" if array.any? {|x| x > 0}

Alternatively

raise "Invalid positive" unless array.all? {|x| x <= 0}

Kind regards

robert

-- 
use.inject do |as, often| as.you_can - without end