Permalink
Browse files

Render bucket in Couchbase::Result#inspect

Change-Id: I70f287eea4d55145ffdfa57b46e670aea3e2e54d
Reviewed-on: http://review.couchbase.org/23702
Tested-by: Sergey Avseyev <sergey.avseyev@gmail.com>
Reviewed-by: Sokolov Yura <funny.falcon@gmail.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>
  • Loading branch information...
1 parent 4cc29b0 commit 3875dd821bc215c907d9b6e6bcdd03b9e3f995ad @avsej avsej committed Jan 4, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 ext/couchbase_ext/result.c
@@ -61,6 +61,12 @@ cb_result_inspect(VALUE self)
rb_str_append(str, rb_inspect(attr));
}
+ attr = rb_attr_get(self, cb_id_iv_value);
+ if (RTEST(attr) && rb_obj_is_kind_of(attr, cb_cBucket)) {
+ rb_str_buf_cat2(str, " bucket="); /* value also accessible using alias #bucket */
+ rb_str_append(str, rb_inspect(attr));
+ }
+
attr = rb_attr_get(self, cb_id_iv_key);
if (RTEST(attr)) {
rb_str_buf_cat2(str, " key=");

0 comments on commit 3875dd8

Please sign in to comment.