[Ironruby-core] IronRuby 0.9.2 bug - super(.S, 1*&):433 @1 not supported on foreign meta-objects

Orion Edwards orion.edwards at gmail.com
Sun Nov 8 21:27:32 EST 2009

I have the following code, which used to work under IronRuby 0.9.1 and

class Object
  def method_missing(sym, *args, &block)
    if sym.to_s =~ /blah regex/
      # do stuff
      super # call through to underlying ruby method_missing

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
System::NotSupportedException: super(.S,1*&):482 @1 not supported on foreign
        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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20091109/0d1d11e1/attachment-0001.html>

More information about the Ironruby-core mailing list