summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-16 10:34:57 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-07-16 10:34:57 +0000
commiteccc9886ea744699ea5e77b20d53fb175c7a9d4e (patch)
treeec81e6a157aa60e47ebaffa26fa78febab006b7a /ext
parent239c98553dfe22ed77bb89e3b2c744eb279d9116 (diff)
* ext/win32ole/win32ole.c (fole_record_method_missing): call
rb_hash_fetch instead of rb_hash_aref. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/win32ole.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 3bf1cb40544..57849463ef7 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -143,7 +143,7 @@ const IID IID_IMultiLanguage2 = {0xDCCFC164, 0x2B38, 0x11d2, {0xB7, 0xEC, 0x00,
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "1.5.7"
+#define WIN32OLE_VERSION "1.5.8"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -9280,18 +9280,14 @@ fole_record_typename(VALUE self)
* call-seq:
* WIN32OLE_RECORD#method_missing(name)
*
- * Returns value specified by VT_RECORD OLE variable member name.
+ * Returns value specified by the member name of VT_RECORD OLE variable.
+ * If the member name is not correct, KeyError exception is raised.
*/
static VALUE
fole_record_method_missing(VALUE self, VALUE name)
{
-
VALUE fields = rb_ivar_get(self, rb_intern("fields"));
- VALUE val = rb_hash_aref(fields, rb_sym_to_s(name));
- if (val != Qnil) {
- return val;
- }
- return rb_call_super(0, 0);
+ return rb_hash_fetch(fields, rb_sym_to_s(name));
}
static void