do not catch NameError when looking up Builder#run method
This commit is contained in:
parent
d315f86a36
commit
8a1dfb0785
@ -584,15 +584,10 @@ module Rscons
|
|||||||
# Invoke pre-build hooks.
|
# Invoke pre-build hooks.
|
||||||
call_build_hooks[:pre]
|
call_build_hooks[:pre]
|
||||||
|
|
||||||
use_new_run_method_signature =
|
|
||||||
begin
|
|
||||||
builder.method(:run).arity == 1
|
|
||||||
rescue NameError
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
# Call the builder's #run method.
|
# Call the builder's #run method.
|
||||||
if use_new_run_method_signature
|
if builder.method(:run).arity == 5
|
||||||
|
rv = builder.run(target, sources, cache, self, vars)
|
||||||
|
else
|
||||||
rv = builder.run(
|
rv = builder.run(
|
||||||
target: target,
|
target: target,
|
||||||
sources: sources,
|
sources: sources,
|
||||||
@ -600,8 +595,6 @@ module Rscons
|
|||||||
env: self,
|
env: self,
|
||||||
vars: vars,
|
vars: vars,
|
||||||
setup_info: options[:setup_info])
|
setup_info: options[:setup_info])
|
||||||
else
|
|
||||||
rv = builder.run(target, sources, cache, self, vars)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if rv.is_a?(ThreadedCommand)
|
if rv.is_a?(ThreadedCommand)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user