From 42ab1fd2a689efc03085f4ec9236b1abdeac8f40 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 7 Dec 2018 14:37:28 +0000 Subject: [PATCH] Array#any? just returns true/false git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/ruby/library/win32ole/fixtures/classes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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