From 35ca97e9816753123e273948568fab98348b3a5b Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 27 Oct 2018 22:50:08 +0000 Subject: 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 --- spec/ruby/library/win32ole/fixtures/classes.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'spec/ruby/library') 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 -- cgit v1.2.3