Sha256: 65850c29a126bf99f8f00b2d3a23dec8ab7a65949fec7537f980c82d5e78ebcb
Contents?: true
Size: 587 Bytes
Versions: 9
Compression:
Stored size: 587 Bytes
Contents
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
Version data entries
9 entries across 9 versions & 2 rubygems