diff options
author | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 22:50:08 +0000 |
---|---|---|
committer | suke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 22:50:08 +0000 |
commit | 35ca97e9816753123e273948568fab98348b3a5b (patch) | |
tree | b97d5b9afab30db2ee6983187534379232b8d5bf /spec | |
parent | 1064376b86729c3b2a0f91463c848215defb41c7 (diff) |
add WIN32OLESpecs::MSXML_AVAILABLE
* spec/ruby/library/win32ole/fixtures/classes.rb: add
WIN32OLESpecs::MSXML_AVAILABLE
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r-- | spec/ruby/library/win32ole/fixtures/classes.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/ruby/library/win32ole/fixtures/classes.rb b/spec/ruby/library/win32ole/fixtures/classes.rb index cde47f7580..407af553c2 100644 --- a/spec/ruby/library/win32ole/fixtures/classes.rb +++ b/spec/ruby/library/win32ole/fixtures/classes.rb @@ -1,4 +1,15 @@ +begin + require 'win32ole' +rescue LoadError +end + module WIN32OLESpecs + begin + MSXML_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find { |t| t.name.start_with?('Microsoft XML') } + rescue + MSXML_AVAILABLE = false + end + def self.new_ole(name) tries = 0 begin |