In article <5.1.0.14.0.20020404153158.01dea910 / pop3.bip.net>,
 Liorean <Liorean / user.bip.net> wrote:

> Also, I'd like to know how to detect whether a property of an object exists 
> or not, something of the kind:
>    if(typeof document.all!='undefined'){/* some action or other... */}

an_array = []

if defined?(an_array.push)
      #do something here
end

or...

if x = defined? an_array.push
   p x
end

prints out "method"