/* * call-seq: * query.to_s -> string * * Return a string representation of the query. Most of the time, passing * this string through the Query parser will give you the exact Query you * began with. This can be a good way to explore how the QueryParser works. */ static VALUE frt_q_to_s(int argc, VALUE *argv, VALUE self) { GET_Q(); VALUE rstr, rfield; char *str, *field = ""; if (rb_scan_args(argc, argv, "01", &rfield)) { field = frt_field(rfield); } str = q->to_s(q, field); rstr = rb_str_new2(str); free(str); return rstr; }