From c4eca8765e9aaf0d2736e764770d72f407affc16 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 6 Oct 2009 12:03:09 -0700 Subject: ext: convert non-Hashes #to_hash if possible This is to remain compatible with Rack if it relaxes Rack::Lint to allow subclasses. --- ext/clogger_ext/clogger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c index 7813c8c..f935c11 100644 --- a/ext/clogger_ext/clogger.c +++ b/ext/clogger_ext/clogger.c @@ -714,6 +714,8 @@ static VALUE clogger_call(VALUE self, VALUE env) struct clogger *c = clogger_get(self); VALUE rv; + env = rb_check_convert_type(env, T_HASH, "Hash", "to_hash"); + if (c->wrap_body) { if (c->reentrant < 0) { VALUE tmp = rb_hash_aref(env, g_rack_multithread); -- cgit v1.2.3-24-ge0c7