lib/mruby/build.rb: refactoring ensure clause; ref #5381

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-03-18 22:47:00 +09:00
parent 99f00de040
commit 0e4f438eca
+6 -10
View File
@@ -133,19 +133,15 @@ module MRuby
MRuby::Build.current = current
begin
current.instance_eval(&block)
rescue Exception => err
raise
ensure
unless err
if current.libmruby_enabled? && !current.mrbcfile_external?
if current.presym_enabled?
current.create_mrbc_build if current.host? || current.gems["mruby-bin-mrbc"]
elsif current.host?
current.build_mrbc_exec
end
if current.libmruby_enabled? && !current.mrbcfile_external?
if current.presym_enabled?
current.create_mrbc_build if current.host? || current.gems["mruby-bin-mrbc"]
elsif current.host?
current.build_mrbc_exec
end
current.presym = Presym.new(current) if current.presym_enabled?
end
current.presym = Presym.new(current) if current.presym_enabled?
end
end