Bug #4699
Arrays - affectation
| Status: | Rejected | Start date: | 05/16/2011 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | Ruby 1.8.7 | |||
| ruby -v: | ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux] |
Description
a = [1,2,3]
b = a
b[1] = 10
the content of a : [1, 10, 3]
why the variables a and b point on the same space ?
a.object_id = b.boject_id
History
Updated by rue (Eero Saynatkari) about 1 year ago
This is a feature, not a bug.
Updated by sorah (Shota Fukumori) about 1 year ago
- Status changed from Open to Rejected
If a.object_id == b.object_id, this is a feature.
If a.object_id != b.object_id, this is a bug.