Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6775
| Newsgroups | comp.lang.ruby |
|---|---|
| Date | 2013-03-21 10:18 -0700 |
| References | <3e2ec553-ee7d-4625-8e2d-4d2687a165ad@googlegroups.com> |
| Message-ID | <a3a46df6-0291-4b0b-a738-1af96fa3e362@googlegroups.com> (permalink) |
| Subject | Re: Need help with something very simple |
| From | Jatin Ganhotra <jatin.ganhotra@gmail.com> |
Thanks @Christian. It worked like a charm.
On Thursday, 21 March 2013 21:09:32 UTC+5:30, Jatin Ganhotra wrote:
> Hi,
>
>
>
> 1.9.3p194 :005 > array = [ 1, 2]
>
> => [1, 2]
>
> 1.9.3p194 :007 > puts "Array when output in \"\" is #{array}"
>
> Array when output in "" is [1, 2]
>
> => nil
>
>
>
> Can I do something, so that the output is:
>
> Array when output in "" is (1, 2)
>
>
>
> If you want to know why I want to do this, please read further:
>
>
>
> I am currently working on a Facebook app, where I am doing this FQL query:
>
>
>
> SELECT uid,name FROM user WHERE uid IN ( 1808606809, 100000255371755)
>
>
>
> The above FQL query works fine in Graph API Explorer provided by Facebook.
>
> However, in my app source code, I have an array of such UID's (e.g 1808606809 and 100000255371755 here.)
>
>
>
> To do the query, If I pass #{array_of_ids} inside the "", it doesn't work. Hence, I need it to be inside "()" and not "[]".
Back to comp.lang.ruby | Previous | Next — Previous in thread | Next in thread | Find similar
Need help with something very simple Jatin Ganhotra <jatin.ganhotra@gmail.com> - 2013-03-21 08:39 -0700
Re: Need help with something very simple Christian Neukirchen <chneukirchen@gmail.com> - 2013-03-21 17:55 +0100
Re: Need help with something very simple Jatin Ganhotra <jatin.ganhotra@gmail.com> - 2013-03-21 10:18 -0700
Re: Need help with something very simple Robert Klemme <shortcutter@googlemail.com> - 2013-03-21 22:23 +0100
csiph-web