summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/syslog/syslog.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9201d3e719..3c477b4958 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 21 16:29:47 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
+ module before calling rb_class2name().
+
Fri May 11 14:09:48 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/bigdecimal/bigdecimal.c (PUSH): to prevent VALUE from GC,
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index ecc49318f7..1372cb7b3b 100644
--- a/ext/syslog/syslog.c
+++ b/ext/syslog/syslog.c
@@ -168,6 +168,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>",