about summary refs log tree commit homepage
path: root/ext/clogger_ext/clogger.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/clogger_ext/clogger.c')
-rw-r--r--ext/clogger_ext/clogger.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c
index 622c98c..daed91a 100644
--- a/ext/clogger_ext/clogger.c
+++ b/ext/clogger_ext/clogger.c
@@ -965,16 +965,19 @@ static VALUE clogger_init_copy(VALUE clone, VALUE orig)
  */
 static VALUE respond_to(int argc, VALUE *argv, VALUE self)
 {
-        VALUE method, include_all;
-        rb_scan_args(argc, argv, "11", &method, &include_all);
-        if (NIL_P(include_all)) include_all = Qfalse;
-
         struct clogger *c = clogger_get(self);
-        ID id = rb_to_id(method);
+        VALUE method, include_all;
+        ID id;
 
+        rb_scan_args(argc, argv, "11", &method, &include_all);
+        id = rb_to_id(method);
         if (close_id == id)
                 return Qtrue;
-        return rb_respond_to(c->body, id);
+
+        if (argc == 1)
+                return rb_respond_to(c->body, id);
+
+        return rb_funcallv(c->body, respond_to_id, argc, argv);
 }
 
 /*