Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 506d9f6e84
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (18 sloc) 0.587 kB
module Marshal
class << self
def dump_with_mocks(*args)
object = args.shift
return dump_without_mocks(*args.unshift(object)) unless object.instance_variable_defined?(:@mock_proxy)
mp = object.instance_variable_get(:@mock_proxy)
object.send(:remove_instance_variable, :@mock_proxy)
begin
dump_without_mocks(*args.unshift(object.dup))
ensure
object.instance_variable_set(:@mock_proxy,mp)
end
end
alias_method :dump_without_mocks, :dump
undef_method :dump
alias_method :dump, :dump_with_mocks
end
end
Jump to Line
Something went wrong with that request. Please try again.