mvidner/ruby-dbus — pull request #22 by miaoufkirsh (2012-05-02 17:33:36+00:00)
Title: Interfaces added with singleton_class.instance_eval aren't exported

When we dynamically add an interface to an object, for example with the code :

```ruby
obj.singleton_class.instance_eval do
dbus_interface "org.ruby.DynamicInterface" do
dbus_method :hello, "in name:s, in name2:s" do |name, name2|
puts "hello(#{name}, #{name2})"
end
end
end
```

the interface isn't exported.

In https://github.com/mvidner/ruby-dbus/commit/785d2059e16842d8c0612b9f3775ead3ec1b5246#L4R50 , the method to get the interfaces uses ```self.class``` and thus gets the interfaces from the object class and not from the singleton_class derived from the object.

A test is provided.