diff options
author | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-01 17:27:38 +0000 |
---|---|---|
committer | marcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-01-01 17:27:38 +0000 |
commit | 9543908c9f2f6322117627f9c7a4a5699c9158d9 (patch) | |
tree | 39520e93bcd71a5482ba12f5f3fea6ab690f1d46 /lib/ostruct.rb | |
parent | 428fe14f5e5077a615bf4338f3fd88a5cbd322eb (diff) | |
download | ruby-9543908c9f2f6322117627f9c7a4a5699c9158d9.tar.gz |
* lib/ostruct.rb: Fix case of frozen object with initializer.
Bug revealed by RubySpec [ruby-core:72639]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/ostruct.rb')
-rw-r--r-- | lib/ostruct.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ostruct.rb b/lib/ostruct.rb index 17efcdc8d3..a95a0f1963 100644 --- a/lib/ostruct.rb +++ b/lib/ostruct.rb @@ -195,7 +195,7 @@ class OpenStruct modifiable[new_ostruct_member(mname)] = args[0] elsif len == 0 if @table.key?(mid) - new_ostruct_member(mid) + new_ostruct_member(mid) unless frozen? @table[mid] end else |