From 4dcdbb4afcd99ce20dc7fd46dc712cf7ff25a36e Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 21 Sep 2015 15:46:44 +0000 Subject: win32ole.c: fix symbol condition * ext/win32ole/win32ole.c (fole_missing): fix symbol condition, rb_check_symbol returns Qnil when the symbol is not interned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/win32ole.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 1964314484..a76d3fc184 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -3283,7 +3283,7 @@ fole_missing(int argc, VALUE *argv, VALUE self) rb_check_arity(argc, 1, UNLIMITED_ARGUMENTS); mid = argv[0]; sym = rb_check_symbol(&mid); - if (sym) mid = rb_sym2str(sym); + if (!NIL_P(sym)) mid = rb_sym2str(sym); mname = StringValueCStr(mid); if(!mname) { rb_raise(rb_eRuntimeError, "fail: unknown method or property"); -- cgit v1.2.1