mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #4264 from shuujii/integrate-definition-of-exefile
Integrate definition of `MRuby::Build#exefile`
This commit is contained in:
+4
-1
@@ -270,8 +270,11 @@ EOS
|
||||
def exefile(name)
|
||||
if name.is_a?(Array)
|
||||
name.flatten.map { |n| exefile(n) }
|
||||
else
|
||||
elsif File.extname(name).empty?
|
||||
"#{name}#{exts.executable}"
|
||||
else
|
||||
# `name` sometimes have (non-standard) extension (e.g. `.bat`).
|
||||
name
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,17 +1,3 @@
|
||||
module MRuby
|
||||
class Build
|
||||
def exefile(name)
|
||||
if name.is_a?(Array)
|
||||
name.flatten.map { |n| exefile(n) }
|
||||
elsif name !~ /\./
|
||||
"#{name}#{exts.executable}"
|
||||
else
|
||||
name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
MRuby.each_target do
|
||||
next if kind_of? MRuby::CrossBuild
|
||||
|
||||
|
||||
Reference in New Issue
Block a user