From 4cbaddcf8c61f411d54c2e7799e234972dd382ed Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 6 Nov 2004 11:42:35 +0000 Subject: * ext/win32ole/win32ole.c: rename WIN32OLE#ole_obj_help to WIN32OLE#ole_type. alias ole_obj_help to ole_type. * ext/win32ole/tests/testWIN32OLE.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/tests/testWIN32OLE.rb | 8 ++++++++ ext/win32ole/win32ole.c | 13 +++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'ext/win32ole') diff --git a/ext/win32ole/tests/testWIN32OLE.rb b/ext/win32ole/tests/testWIN32OLE.rb index d0705093f3..379eca315d 100644 --- a/ext/win32ole/tests/testWIN32OLE.rb +++ b/ext/win32ole/tests/testWIN32OLE.rb @@ -223,6 +223,14 @@ class TestWin32OLE < RUNIT::TestCase book = workbooks.invoke( 'add' ) assert_instance_of(WIN32OLE, book) end + def test_ole_type + tobj = @excel.ole_type + assert_equal('_Application', tobj.name) + end + def test_ole_obj_help + tobj = @excel.ole_type + assert_equal('_Application', tobj.name) + end def test_ole_methods methods = @excel.ole_methods method_names = methods.collect{|m| m.name} diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index 78f78a4b84..aab1a9c7f7 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -79,7 +79,7 @@ #define WC2VSTR(x) ole_wc2vstr((x), TRUE) -#define WIN32OLE_VERSION "0.6.2" +#define WIN32OLE_VERSION "0.6.3" typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX) (REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*); @@ -1739,7 +1739,7 @@ ole_show_help(helpfile, helpcontext) * object or WIN32OLE_METHOD object or helpfile. * * excel = WIN32OLE.new('Excel.Application') - * typeobj = excel.ole_obj_help + * typeobj = excel.ole_type * WIN32OLE.ole_show_help(typeobj) */ static VALUE @@ -2945,15 +2945,15 @@ fole_func_methods( self ) /* * call-seq: - * WIN32OLE#ole_obj_help + * WIN32OLE#ole_type * * Returns WIN32OLE_TYPE object. * * excel = WIN32OLE.new('Excel.Application') - * tobj = excel.ole_obj_help + * tobj = excel.ole_type */ static VALUE -fole_obj_help( self ) +fole_type( self ) VALUE self; { unsigned int index; @@ -6600,7 +6600,8 @@ Init_win32ole() rb_define_method(cWIN32OLE, "ole_method", fole_method_help, 1); rb_define_alias(cWIN32OLE, "ole_method_help", "ole_method"); - rb_define_method(cWIN32OLE, "ole_obj_help", fole_obj_help, 0); + rb_define_method(cWIN32OLE, "ole_type", fole_type, 0); + rb_define_alias(cWIN32OLE, "ole_obj_help", "ole_type"); rb_define_method(cWIN32OLE, "ole_typelib", fole_typelib, 0); rb_define_const(cWIN32OLE, "VERSION", rb_str_new2(WIN32OLE_VERSION)); -- cgit v1.2.3