Class: Object

Inherits:
BasicObject
Defined in:
lib/ruby_parser/bm_sexp_processor.rb

Instance Method Summary collapse

Instance Method Details

#deep_cloneObject

deep_clone is the usual Marshalling hack to make a deep copy. It is rather slow, so use it sparingly. Helps with debugging SexpProcessors since you usually shift off sexps.



200
201
202
# File 'lib/ruby_parser/bm_sexp_processor.rb', line 200

def deep_clone
  Marshal.load(Marshal.dump(self))
end