Permalink
Browse files

allow clone_method declarations to end with a !

  • Loading branch information...
ninjudd committed Dec 6, 2008
1 parent 8647578 commit f2aea26495522bd8e5f833734c855aae3f93561c
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/deep_clonable.rb
View
@@ -42,6 +42,7 @@ module ClassMethods
# that part is important) and specify the cloning versions by name
# using this method.
def clone_method(clone_method_name, method_name = nil)
+ clone_method_name = clone_method_name.to_s.gsub(/\!$/,'')
method_name ||= "#{clone_method_name}!"
class_eval %{
def #{clone_method_name}(*args)

0 comments on commit f2aea26

Please sign in to comment.