* 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:
nobu 2004-02-20 10:11:25 +00:00
Родитель 50b775851a
Коммит 33e064afff
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -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> 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 * lib/irb/init.rb (IRB::IRB.parse_opts): add -I option to

Просмотреть файл

@ -52,6 +52,12 @@ class OpenStruct
end end
end end
# Duplicate an OpenStruct object members.
def initialize_copy(orig)
super
@table = @table.dup
end
def method_missing(mid, *args) # :nodoc: def method_missing(mid, *args) # :nodoc:
mname = mid.id2name mname = mid.id2name
len = args.length len = args.length