Need help with something very simple

J

Jatin Ganhotra

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 "[]".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top