thoughtbot/griddler — pull request #71 by theycallmeswift (2013-08-07 14:08:25+00:00)
Title: If the email body is nil, don't try to split it again

This is one way to deal with #70 and #64. Essentially the issue is that we're expecting a well formed body with a reply delimiter, but that may not be the case. I moved the gsubs up top because those can happen early on, and then whenever we do an unsafe split I either return the first element or an empty string.

I actually would prefer something like this though:

```ruby
class String
def safe_split(matcher)
split_self = self.split(matcher)
if split_self.empty?
split_self = [""]
end
split_self
end
end
```

I'm very hesitant to extend string though, so if you guys have a better solution LMK.