From fab393b78e730f407d4bf2bdfa2a0c22542f4427 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 18 Nov 2007 21:29:02 +0000 Subject: [PATCH] * Use to_i on the event mask, it is not always an Integer --- ruby/caca-display.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby/caca-display.c b/ruby/caca-display.c index fd69faa..8440e33 100644 --- a/ruby/caca-display.c +++ b/ruby/caca-display.c @@ -125,6 +125,8 @@ static VALUE get_event(VALUE self, VALUE event_mask, VALUE timeout) caca_event_t ev; VALUE e; + event_mask = rb_funcall(event_mask, rb_intern("to_i"), 0); + if(caca_get_event(_SELF, NUM2UINT(event_mask), &ev, NUM2INT(timeout)) == 0) { return Qnil;