1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Array#any? just returns true/false

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-12-07 14:37:28 +00:00
parent 0c00335038
commit 42ab1fd2a6

View file

@ -1,8 +1,8 @@
require 'win32ole' require 'win32ole'
module WIN32OLESpecs module WIN32OLESpecs
MSXML_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find { |t| t.name.start_with?('Microsoft XML') } MSXML_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('Microsoft XML') }
SYSTEM_MONITOR_CONTROL_AVAILABLE = !!WIN32OLE_TYPELIB.typelibs.find{ |t| t.name.start_with?('System Monitor Control') } SYSTEM_MONITOR_CONTROL_AVAILABLE = WIN32OLE_TYPELIB.typelibs.any? { |t| t.name.start_with?('System Monitor Control') }
def self.new_ole(name) def self.new_ole(name)
tries = 0 tries = 0