summaryrefslogtreecommitdiff
path: root/ext/win32ole
diff options
context:
space:
mode:
authorsuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-20 12:04:02 +0000
committersuke <suke@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-20 12:04:02 +0000
commit3dec8be26548a46d3ab5833f4248088fa44be846 (patch)
tree13df64cf8b97a034c4bfb15f7fea0d9734f4e125 /ext/win32ole
parent004ae5d39cfc0a3efeb3a9a5a445c84efd2d5922 (diff)
refactoring
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/win32ole')
-rw-r--r--ext/win32ole/tests/testINVOKEVERB.rb16
1 files changed, 7 insertions, 9 deletions
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