Skip to content

Commit

Permalink
Alias Hash#initialize_copy to Hash#replace
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosgaldino committed May 17, 2012
1 parent 6f7224f commit 21a5fa2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions kernel/common/hash19.rb
Expand Up @@ -349,11 +349,6 @@ def initialize(default=undefined, &block)
end
private :initialize

def initialize_copy(other)
replace other
end
private :initialize_copy

alias_method :to_s, :inspect

def merge!(other)
Expand Down Expand Up @@ -456,6 +451,9 @@ def replace(other)
self
end

alias_method :initialize_copy, :replace
private :initialize_copy

def select
return to_enum(:select) unless block_given?

Expand Down

0 comments on commit 21a5fa2

Please sign in to comment.