summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/win32ole/win32ole.c12
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 938118d5f96..6f4cc3014be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jul 16 19:32:23 2014 Masaki Suketa <masaki.suketa@nifty.ne.jp>
+
+ * ext/win32ole/win32ole.c (fole_record_method_missing): call
+ rb_hash_fetch instead of rb_hash_aref.
+
Wed Jul 16 18:08:47 2014 Koichi Sasada <ko1@atdot.net>
* iseq.c (rb_iseq_defined_string): use rb_gc_mark_object() instead of
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