1
0
mirror of https://github.com/robertkrimen/otto synced 2025-10-26 20:28:49 +08:00

Allow (internal) enumeration through _every_ Object property

For .freeze, .isFrozen, etc.
This commit is contained in:
Robert Krimen
2013-06-02 15:21:25 -07:00
parent baf3318f30
commit 7ff3e8668e
11 changed files with 34 additions and 22 deletions

View File

@@ -216,7 +216,7 @@ func (self *_runtime) evaluateForIn(node *_forInNode) Value {
result := emptyValue()
object := sourceObject
for object != nil {
object.enumerate(func(name string) {
object.enumerate(false, func(name string) {
into := self.evaluate(into)
// In the case of: for (var abc in def) ...
if into.reference() == nil {