diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index 6dfb085..a065792 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -246,7 +246,6 @@ module Rscons end end - alias_method :orig_method_missing, :method_missing def method_missing(method, *args) if @builders.has_key?(method.to_s) target, source, vars, *rest = args @@ -261,7 +260,7 @@ module Rscons args: rest, } else - orig_method_missing(method, *args) + super end end diff --git a/spec/rscons/environment_spec.rb b/spec/rscons/environment_spec.rb index eee9aed..5e4111e 100644 --- a/spec/rscons/environment_spec.rb +++ b/spec/rscons/environment_spec.rb @@ -249,8 +249,7 @@ module Rscons describe "#method_missing" do it "calls the original method missing when the target method is not a known builder" do env = Environment.new - env.should_receive(:orig_method_missing).with(:foobar) - env.foobar + expect {env.foobar}.to raise_error /undefined method .foobar./ end it "records the target when the target method is a known builder" do