jtrupiano/timecop — pull request #36 by phiggins (2012-08-14 04:37:41+00:00)
Title: Timecop .travel, .freeze and .return return nil or block value.

As @travisjeffery and I [discussed on twitter today](https://twitter.com/travisjeffery/status/235127882006016000), I was surprised that the return value of Timecop.travel was not the value of the block passed in. I think it would be handy to be able to write code like this in tests:

```
old_user = Timecop.travel(Time.at(0)) { User.create }
```

I've gone ahead and implemented code that does this for `.travel`, `.freeze` and `.return` (the last one for consistency). `.return_to_baseline` still returns Time.now because the docs don't mention what it does and I wasn't sure what do there. I also wasn't sure what do in the case where a block is not passed in, so I made those cases return an explicit nil to prevent reliance on an implementation detail.