From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: normalperson@yhbt.net Received: from zedshaw2.xen.prgmr.com (zedshaw2.xen.prgmr.com [71.19.156.177]) by dcvr.yhbt.net (Postfix) with ESMTP id C7AE82028D for ; Thu, 21 Nov 2013 18:48:28 +0000 (UTC) Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id 100D374BD9 for ; Thu, 21 Nov 2013 18:50:54 +0000 (UTC) MIME-Version: 1.0 Date: Thu, 21 Nov 2013 18:48:22 +0000 From: Eric Wong In-Reply-To: <20131121184822.GA9059@dcvr.yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Message-Id: <20131121184822.GA9059@dcvr.yhbt.net> Precedence: list References: <20131121184822.GA9059@dcvr.yhbt.net> Sender: sleepy.penguin@librelist.org Subject: [sleepy.penguin] [PATCH] work around lack of rb_io_get_io in Rubinius To: sleepy.penguin@librelist.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit https://github.com/rubinius/rubinius/issues/2771 --- ext/sleepy_penguin/util.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ext/sleepy_penguin/util.c b/ext/sleepy_penguin/util.c index 9d2123f..2c17e1a 100644 --- a/ext/sleepy_penguin/util.c +++ b/ext/sleepy_penguin/util.c @@ -1,5 +1,13 @@ #include "sleepy_penguin.h" +#ifndef HAVE_RB_IO_GET_IO +static VALUE my_io_get_io(VALUE io) +{ + return rb_convert_type(io, T_FILE, "IO", "to_io"); +} +# define rb_io_get_io(io) my_io_get_io((io)) +#endif /* HAVE_RB_IO_GET_IO */ + static VALUE klass_for(VALUE klass) { return (TYPE(klass) == T_CLASS) ? klass : CLASS_OF(klass); -- 1.8.5.rc2.1.g2f4e96a