I have the following code, which used to work under IronRuby 0.9.1 and
earlier
class Object
def method_missing(sym, *args, &block)
if sym.to_s =~ /blah regex/
# do stuff
else
super # call through to underlying ruby method_missing
end
end
end
Under 0.9.1 this worked across the board, and under 0.9.2 it works for most
objects, but suddenly for COM objects it's throwing an exception on the call
to 'super'
Repro code:
load_assembly "microsoft.office.interop.word"
word = Microsoft.Office.Interop.Word.ApplicationClass.new
word.fdsfgdsf
System::NotSupportedException: super(.S,1*&):482 @1 not supported on foreign
meta-objects
from (irb):12:in `method_missing'
from (irb):16
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:150:in `eval_input'
from :0:in `eval'
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:263:in `signal_status'
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:147:in `eval_input'
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input'
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:70:in `start'
from C:/Dev/TEST/ruby/lib/ruby/1.8/irb.rb:69:in `start'
from C:/Dev/TEST/ruby/bin/iirb:13
from :0:in `loop'
from :0:in `catch'
from :0:in `catch'
I'd be more than happy to work around it by not calling super if the object
is a "foreign meta-object", but how can I tell that?
Cheers, Orion
_______________________________________________
Ironruby-core mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core