RSpec::Mocks.with_temporary_scope does not return the block result
Created by: expeehaa
Subject of the issue
When using a temporary scope I want to get a return value and work with it. However, the method RSpec::Mocks.with_temporary_scope
does not return the result of the block given to it.
Your environment
- Ruby version: ruby-2.5.3
- rspec-mocks version: 3.8.0
Steps to reproduce
Run the following code:
result = RSpec::Mocks.with_temporary_scope do
5
end
Expected behavior
result
is 5
.
Actual behavior
result
is an empty hash {}
.