Array should not initialize its backing store in Array#initialize
Reported by Charles Oliver Nutter | February 26th, 2008 @ 10:20 PM | in 1.0 preview
Note the following code, which blows up because the Array's backing store is not initialized when [] is called:
class MyArray < Array
def initialize
self[0] = 1
end
end
MyArray.new
This is probably due to Array setting up its backing store in Array#initialize, which means it's not available for subclass #initialize implementations. The other classes with backing stores should probably be reviewed as well.
Comments and changes to this ticket
-
Brian Ford February 27th, 2008 @ 03:07 AM
- → State changed from new to resolved
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
