Thanks a lot for contributing!  This is definitely cleaner than what I managed, so I'm going to merge.  

But there is a much cleaner way to do this, actually.  Got some good feedback from people and kzrdude on Hacker News suggested this quite elegant version--which actually takes advantage of the pattern matching feature--which I think I'll switch to when a I get a free moment:

```ruby
match key.len().cmp(&self.block_size) {
    Less => self.zero_pad(key),
    Equal => key,
    Greater => self.zero_pad(self.hash(key).digest),
}
```