[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sc-users] Collection.includes query
Thanks for the clarification, James. However, I cant find any
implementations of includesEqual. Is this new for version 3.3? I use
3.2.
/Anton
On Sat, May 2, 2009 at 4:56 PM, James Harkins <jamshark70@xxxxxxxxx> wrote:
> includes is based on identity, not equality.
> If you wrote this, you'd get false also.
> ServerOptions.devices.detect { |d| d === "JackRouter" }.notNil
> Try the includesEqual method instead.
> hjh
>
> On May 2, 2009, at 10:49 AM, Anton Hörnquist wrote:
>
> I dont understand this:
> ServerOptions.devices
> -> [ Built-in Microphone, Built-in Input, Built-in Output, JackRouter ]
> ServerOptions.devices.detect { |d| d == "JackRouter" }.notNil
> -> true
> ServerOptions.devices.includes("JackRouter")
> -> false
> How come includes in the last interpretation return false?
>
> : H. James Harkins
> : jamshark70@xxxxxxxxxxxxxxxxx
> : http://www.dewdrop-world.net
> .::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal." -- Whitman
>
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/