module RSpec::Mocks::Serialization::YAML
def to_yaml(options = {})
- Private: -
def to_yaml(options = {}) return nil if defined?(::Psych) && options.respond_to?(:[]) && options[:nodump] return super(options) unless instance_variable_defined?(:@mock_proxy) mp = @mock_proxy remove_instance_variable(:@mock_proxy) begin super(options) ensure @mock_proxy = mp end end