pry/pry — Issue #419: binding.pry doesn't work if __method__ has been badly overwritten
Author: ConradIrwin
Created: 2012-01-12 21:55:39+00:00
State: open

This can happen in the wild if you're using the facets gem with rspec and rails on ruby 1.8.7, and try to `binding.pry` from within a test.

The buggy definition of __method__ in question is:
```ruby
def __method__
/\`([^\']+)\'/.match(caller(1).first)[1].to_sym
end
```

and the exception you get is caused by the regex not matching the line in caller.