From 3dec8be26548a46d3ab5833f4248088fa44be846 Mon Sep 17 00:00:00 2001 From: suke Date: Sat, 20 Aug 2005 12:04:02 +0000 Subject: refactoring git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/tests/testINVOKEVERB.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'ext/win32ole/tests') diff --git a/ext/win32ole/tests/testINVOKEVERB.rb b/ext/win32ole/tests/testINVOKEVERB.rb index 3510b9057c..96b3e2f88f 100644 --- a/ext/win32ole/tests/testINVOKEVERB.rb +++ b/ext/win32ole/tests/testINVOKEVERB.rb @@ -26,15 +26,13 @@ class TestInvokeVerb < Test::Unit::TestCase # Yes, I know the string in the Windows 2000 Japanese Edition. # But I do not know about the string in any other Windows. # - @fi2.verbs.each do |v| - # - # We expect the 'Create Shortcut' string is end with '(&S)'. - # - if /.*\(\&S\)$/ =~ v.name - @shortcut = v.name - break - end - end + verbs = @fi2.verbs + verbs.extend(Enumerable) + @shortcut = verbs.collect{|verb| + verb.name + }.find {|name| + /.*\(\&S\)$/ =~ name + } end def test_invokeverb -- cgit v1.2.3