Rugged::Diff#tree returns Rugged::Tree instead of its instance. How to reproduce:
irb(main):001:0> require 'rugged'
=> true
irb(main):002:0> repo = Rugged::Repository.new('.')
=> #<Rugged::Repository:70098604661600 {path: "/Users/mindaugasmozuras/Projects/rugged/.git/"}>
irb(main):003:0> diff = repo.diff('HEAD', 'HEAD~1')
=> #<Rugged::Diff:0x007f8234db3400 @owner=Rugged::Tree>
irb(main):004:0> diff.owner
=> Rugged::Tree
irb(main):005:0> diff.owner.class
=> Class