summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-15 14:11:02 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-15 14:11:02 +0000
commit5e06d87f3116dfa6b9daa2961b3e68fe7270c836 (patch)
tree0729f3c2ae91066bb24ee9223d19ada17838f216 /ext
parent1102bcb7eec370ab4d506c858ed88b5d5c0381ed (diff)
downloadruby-5e06d87f3116dfa6b9daa2961b3e68fe7270c836.tar.gz
ruby-5e06d87f3116dfa6b9daa2961b3e68fe7270c836.tar.xz
ruby-5e06d87f3116dfa6b9daa2961b3e68fe7270c836.zip
The return value of WIN32OLE#ole_methods and WIN32OLE#ole_put_methods
should include PROPERTYPUTREF methods. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/win32ole/tests/test_ole_methods.rb36
-rw-r--r--ext/win32ole/tests/testall.rb1
-rw-r--r--ext/win32ole/win32ole.c6
3 files changed, 40 insertions, 3 deletions
diff --git a/ext/win32ole/tests/test_ole_methods.rb b/ext/win32ole/tests/test_ole_methods.rb
new file mode 100644
index 000000000..4b777a7eb
--- /dev/null
+++ b/ext/win32ole/tests/test_ole_methods.rb
@@ -0,0 +1,36 @@
+#
+# This is test for [ruby-talk:196897]
+#
+begin
+ require 'win32ole'
+rescue LoadError
+end
+require "test/unit"
+
+if defined?(WIN32OLE)
+ class TestWIN32OLE < Test::Unit::TestCase
+
+ def setup
+ @obj = WIN32OLE.new('Scripting.Dictionary')
+ end
+
+ def test_ole_methods
+ x = @obj.ole_methods.select {|m|
+ m.invoke_kind == 'PROPERTYPUTREF'
+ }
+ assert(x.size > 0)
+ assert_equal(1, x.size)
+ assert_equal('Item', x[0].name)
+ end
+
+ def test_ole_put_methods
+ x = @obj.ole_put_methods.select {|m|
+ m.invoke_kind == 'PROPERTYPUTREF'
+ }
+ assert(x.size > 0)
+ assert_equal(1, x.size)
+ assert_equal('Item', x[0].name)
+ end
+
+ end
+end
diff --git a/ext/win32ole/tests/testall.rb b/ext/win32ole/tests/testall.rb
index 4835bac74..2ae4a8898 100644
--- a/ext/win32ole/tests/testall.rb
+++ b/ext/win32ole/tests/testall.rb
@@ -9,4 +9,5 @@ require "testOLEMETHOD"
require "testOLEVARIABLE"
require "testVARIANT"
require "testNIL2VTEMPTY"
+require "test_ole_methods.rb"
# require "testOLEEVENT"
diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index f567fade3..cb6b1673d 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -78,7 +78,7 @@
#define WC2VSTR(x) ole_wc2vstr((x), TRUE)
-#define WIN32OLE_VERSION "0.6.6"
+#define WIN32OLE_VERSION "0.6.7"
typedef HRESULT (STDAPICALLTYPE FNCOCREATEINSTANCEEX)
(REFCLSID, IUnknown*, DWORD, COSERVERINFO*, DWORD, MULTI_QI*);
@@ -2914,7 +2914,7 @@ static VALUE
fole_methods( self )
VALUE self;
{
- return ole_methods( self, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT);
+ return ole_methods( self, INVOKE_FUNC | INVOKE_PROPERTYGET | INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF);
}
/*
@@ -2948,7 +2948,7 @@ static VALUE
fole_put_methods( self )
VALUE self;
{
- return ole_methods( self, INVOKE_PROPERTYPUT);
+ return ole_methods( self, INVOKE_PROPERTYPUT | INVOKE_PROPERTYPUTREF);
}
/*