From: Felipe Contreras Date: Wed, 22 Mar 2023 23:43:45 +0000 (-0600) Subject: ruby: tags: return string array directly X-Git-Tag: 0.38_rc0~37 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=3a52290609b07b51b16b527d1c14ac9836760300 ruby: tags: return string array directly Signed-off-by: Felipe Contreras --- diff --git a/bindings/ruby/tags.c b/bindings/ruby/tags.c index cc6ea59e..955d790f 100644 --- a/bindings/ruby/tags.c +++ b/bindings/ruby/tags.c @@ -23,7 +23,13 @@ VALUE notmuch_rb_tags_get (notmuch_tags_t *tags) { - return Data_Wrap_Notmuch_Object (notmuch_rb_cTags, ¬much_rb_tags_type, tags); + VALUE rb_array = rb_ary_new (); + + for (; notmuch_tags_valid (tags); notmuch_tags_move_to_next (tags)) { + const char *tag = notmuch_tags_get (tags); + rb_ary_push (rb_array, rb_str_new2 (tag)); + } + return rb_array; } /*