summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-21 07:18:43 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-05-21 07:18:43 +0000
commit1b84082a613b7bf3a6a9380b095ee4df4f551011 (patch)
tree62f4711df3e4a42c9c292262b5aca4d0184710d1
parent9c14029fce49322fc434bf59bfa99f71a9eb2dec (diff)
* ext/syslog/syslog.c (mSyslog_inspect): Make sure self is a
module before calling rb_class2name(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 e87b49b..3a04fb1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon May 21 15:02:37 2012 Akinori MUSHA <knu@iDaemons.org>
+
+ * 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 <shyouhei@ruby-lang.org>
* .travis.yml (install): It seems tcl/tk is skipped in Travis
diff --git a/ext/syslog/syslog.c b/ext/syslog/syslog.c
index f4c45df..a0b3ed3 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>",