Changeset [129f2da60a7aca8490b6cef4376c4ca4f1798ee4] by Ernie Miller

June 27th, 2012 @ 08:44 AM

Use Ruby's initialize_copy for clone/dup

Ruby provides a method for implementing deep-copy on
objects called initialize_copy. This gets called after
a clone or dup, and is the more idiomatic way to handle
the sort of thing being done in the previously-defined
clone method.
https://github.com/rubyist/aasm/commit/129f2da60a7aca8490b6cef4376c...

Committed by Ernie Miller

  • M lib/aasm/state_machine.rb
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Library for adding state machines to Ruby classes. Includes persistence layers for things like ActiveRecord. Formerly known as acts_as_state_machine.