mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
239c98553d
commit
eccc9886ea
2 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue