rubysl/rubysl-prettyprint — pull request #1 by rf- (2013-11-04 01:58:55+00:00)
Title: Fix recursive object pretty-printing

This fixes a bug in PP that caused it to always use the normal #inspect method on Objects instead of recursively applying pp_object the way it's supposed to.

PP determines whether a given object's implementation of #inspect is the default one by checking a regex against the return value of method(:inspect).inspect. Rubinius's implementation of Method#inspect doesn't match the expected format, causing PP to treat every object as if it had a custom implementation of #inspect.

The solution is to directly check whether the method's owner is Kernel instead of relying on the format of the inspect string.

**Note:** I can't test this fix against RubySpec because I don't currently have a working dev environment for Rubinius. I did try it as a monkey patch and it behaved as expected.