From 0728ce5ba97ec33761d61bdf65d9ad7719f49557 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Wed, 13 Jun 2012 09:27:09 +0200 Subject: [PATCH] Define RSTRING_NOT_MODIFIED for Rubinius As far as I could tell, the buffer given to the http parser isn't modified. Because it is not modified, we can use the RSTRING_NOT_MODIFIED header to ensure that Rubinius hasn't do the extra work to copy the data back and forth. --- ext/puma_http11/puma_http11.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/puma_http11/puma_http11.c b/ext/puma_http11/puma_http11.c index 60db25e7..ba07b0ba 100644 --- a/ext/puma_http11/puma_http11.c +++ b/ext/puma_http11/puma_http11.c @@ -2,6 +2,9 @@ * Copyright (c) 2005 Zed A. Shaw * You can redistribute it and/or modify it under the same terms as Ruby. */ + +#define RSTRING_NOT_MODIFIED 1 + #include "ruby.h" #include "ext_help.h" #include