File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 44class NativeFolder
55 attr_reader :os , :bit
66
7- WIN_FORMAT = 'windows%d'
8- LINUX_FORMAT = 'linux%d'
7+ WIN_FORMAT = 'windows%d' . freeze
8+ LINUX_FORMAT = 'linux%d' . freeze
99 WIN_PATTERNS = [
1010 /bccwin/i ,
1111 /cygwin/i ,
@@ -22,13 +22,13 @@ def initialize
2222
2323 def name
2424 return 'macosx' if os =~ /darwin/ || os =~ /mac/
25- return format ( WIN_FORMAT , bit ) if WIN_PATTERNS . any? os
25+ return format ( WIN_FORMAT , bit ) if WIN_PATTERNS . any? { | pat | pat =~ os }
2626 return format ( LINUX_FORMAT , bit ) if os =~ /linux/
2727 end
2828
2929 def extension
3030 return '*.so' if os =~ /linux/
31- return '*.dll' if WIN_PATTERNS . any? os
31+ return '*.dll' if WIN_PATTERNS . any? { | pat | pat =~ os }
3232 '*.dylib' # MacOS
3333 end
3434end
You can’t perform that action at this time.
0 commit comments