travisjeffery/timecop — pull request #126 by camertron (2014-09-11 21:08:17+00:00)
Title: Issue when an error is raised in a Timecop.return block

Consider this example:

```ruby
Timecop.travel(Time.now - (1 * 24 * 60 * 60)) do
puts Time.now.to_s
Timecop.return { puts Time.now.to_s; raise 'foo!' } rescue nil
puts Time.now.to_s
end
```

Console output:

```
2014-09-10 14:05:55 -0700
2014-09-11 14:05:55 -0700
2014-09-11 14:05:55 -0700
```

Errors raised in a `Timecop.return` block mean the previous time is never restored, undoing any freezes or travels. This PR simply adds an `ensure` statement in `Timecop#return` that ensures the current stack always gets restored, even when an error occurs in the `yield`.