From 63ae1e3cb5d302e5229143c00152328166d26780 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 29 Jul 2018 00:09:08 +0000 Subject: mkexports.rb: flip-flop * win32/mkexports.rb (Exports::Mswin#each_export): get rid of flip-flop warning. [ruby-core:88147] [Bug #14946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/mkexports.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/win32/mkexports.rb b/win32/mkexports.rb index 887b5d909b..3bb7594b3e 100755 --- a/win32/mkexports.rb +++ b/win32/mkexports.rb @@ -109,7 +109,11 @@ class Exports::Mswin < Exports objs = objs.collect {|s| s.tr('/', '\\')} filetype = nil objdump(objs) do |l| - if (filetype = l[/^File Type: (.+)/, 1])..(/^\f/ =~ l) + if filetype + if /^\f/ =~ l + filetype = nil + next + end case filetype when /OBJECT/, /LIBRARY/ next if /^[[:xdigit:]]+ 0+ UNDEF / =~ l @@ -130,6 +134,8 @@ class Exports::Mswin < Exports next end yield l.strip, is_data + else + filetype = l[/^File Type: (.+)/, 1] end end yield "strcasecmp", "msvcrt.stricmp" -- cgit v1.2.3