I would probably use a `throw` here. Then you do:
```ruby
def hash
  res = 0x345678 + self.length
  catch(:hash_recursion) do
    self.inner_hash(res)
  end
end

def inner_hash(res)
  Thread.current.recursion_guard(self) do
    *snip*
  end
  throw :hash_recursion, res
end
```