mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
lib/mruby/build.rb: refactoring ensure clause; ref #5381
This commit is contained in:
+6
-10
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user