diff --git a/ChangeLog b/ChangeLog index e87b49bf8e..3a04fb1231 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon May 21 15:02:37 2012 Akinori MUSHA + + * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a + module before calling rb_class2name(). + Mon May 21 12:44:11 2012 URABE Shyouhei * .travis.yml (install): It seems tcl/tk is skipped in Travis diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c index f4c45dfbe4..a0b3ed3af7 100644 --- a/ext/syslog/syslog.c +++ b/ext/syslog/syslog.c @@ -315,6 +315,8 @@ static VALUE mSyslog_inspect(VALUE self) { char buf[1024]; + Check_Type(self, T_MODULE); + if (syslog_opened) { snprintf(buf, sizeof(buf), "<#%s: opened=true, ident=\"%s\", options=%d, facility=%d, mask=%d>",