From 58d7f4edd5164c41ffa0de894136c3c4209ff68e Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 26 Jun 2013 20:49:16 -0400 Subject: [PATCH] call original method_missing() from Environment's method_missing() when a builder is not found --- lib/rscons/environment.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index 4412f74..82661d3 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -61,11 +61,15 @@ module Rscons fname.sub(/\.[^.]*$/, '') end + alias_method :orig_method_missing, :method_missing + def method_missing(method, *args) if @builders.has_key?(method.to_s) # TODO: build sources if necessary builder = @builders[method.to_s].new builder.run(self, *args) + else + orig_method_missing(method, *args) end end end