diff --git a/spec/ruby/library/win32ole/fixtures/classes.rb b/spec/ruby/library/win32ole/fixtures/classes.rb index 70612ed427..f61cf6ba69 100644 --- a/spec/ruby/library/win32ole/fixtures/classes.rb +++ b/spec/ruby/library/win32ole/fixtures/classes.rb @@ -1,8 +1,8 @@ require 'win32ole' module WIN32OLESpecs - MSXML_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find { |t| t.name.start_with?('Microsoft XML') } - SYSTEM_MONITOR_CONTROL_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find{ |t| t.name.start_with?('System Monitor Control') } + MSXML_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('Microsoft XML') } + SYSTEM_MONITOR_CONTROL_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('System Monitor Control') } def self.new_ole(name) tries = 0