mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
50b775851a
commit
33e064afff
2 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue