Skip to content

Commit

Permalink
string literals and objects have length
Browse files Browse the repository at this point in the history
  • Loading branch information
mjc1283 committed Aug 19, 2011
1 parent 343d3c5 commit 919ab9e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions envs/es5.env
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ let [%ToObject] = func (o) {
{[#class: "String",
#extensible: true,
#proto: %StringProto,
#value: o,]}
#value: o,]
"length" : {#value prim("strlen", o), #writable true}}
}
else { null };
if (t === "number") {
Expand Down Expand Up @@ -641,7 +642,8 @@ let [%StringConstructor] = func(this, args) {
// Called as function
S
} else {
{[#proto : %StringProto, #value : S, #class : "String",]}
{[#proto : %StringProto, #value : S, #class : "String",]
"length" : {#value prim("strlen", S), #writable true}}
}
}

Expand Down

0 comments on commit 919ab9e

Please sign in to comment.