fix segfault in --debug-objects /cc https://github.com/github/ruby-thecodeshop/commit/9c0093e2#commitcomment-3239143