зеркало из https://github.com/github/ruby.git
* lib/ostruct.rb (OpenStruct#initialize_copy): should not share
members. [ruby-dev:22966] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
50b775851a
Коммит
33e064afff
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 20 19:11:20 2004 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/ostruct.rb (OpenStruct#initialize_copy): should not share
|
||||
members. [ruby-dev:22966]
|
||||
|
||||
Fri Feb 20 18:59:47 2004 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to
|
||||
|
|
|
@ -52,6 +52,12 @@ class OpenStruct
|
|||
end
|
||||
end
|
||||
|
||||
# Duplicate an OpenStruct object members.
|
||||
def initialize_copy(orig)
|
||||
super
|
||||
@table = @table.dup
|
||||
end
|
||||
|
||||
def method_missing(mid, *args) # :nodoc:
|
||||
mname = mid.id2name
|
||||
len = args.length
|
||||
|
|
Загрузка…
Ссылка в новой задаче