[LRUG] Subtracting two arrays

Jim Myhrberg contact at jimeh.me
Thu Dec 16 12:25:53 PST 2010


 It happens, specially when you're new to Ruby :)... Generally the best idea is to start with looking at the documentation for the object you're dealing with.


In this case a quick google for "ruby array" would bring you to the Ruby Array documentation, which describes the "-" method:
http://ruby-doc.org/core/classes/Array.html#M002211


Even after 2 years with Ruby, I still find myself referring to this kinda documentation on an almost daily basis for different things :)




-jim





On Thursday, December 16, 2010 at 18:25, John Winters wrote:

> On 16/12/10 18:23, John Winters wrote:
> [snip]
> 
> >  Does such a way exist?
> > 
> > 
> 
> *Pink with embarrassment*
> 
> As soon as I thought of it as "subtracting" (which I only did as I wrote 
> that post) the answer became obvious.
> 
> Sorry to have troubled you.
> 
> Cheers,
> John
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> 
> 
> 
> 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20101216/c24a417b/attachment-0003.html>


More information about the Chat mailing list