Hi,
Is there a way to override the method_missing method and keep the
SetVariable lookup behavior from ScriptScope?
For example,
in C#
aScriptScope.SetVariable("a", "some_value")
in Ruby
p a
=> "some_value"
But if I do,
class << self
def method_missing(sym, *args, &block)
case (sym)
when :some_case
do_something
else
super #try to fallback to the original
end
end
end
or
class << self
alias :old_method_missing :method_missing
def method_missing(sym, *args, &block)
case (sym)
when :some_case
do_something
else
old_method_missing(sym, *args, &block) #try to fallback to the
original
end
end
end
p a
=> NameError: undefined local variable or method 'a' for main:Object
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core