rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 193 forks source link

Should V8::Object accept symbolic keys as an alternative lookup mechanism? #259

Closed palfvin closed 11 months ago

palfvin commented 11 years ago

I was thinking it would be nice if V8::Object behaved like HashWithIndifferentAccess in terms of accepting symbolic keys as alias for string keys. It seems like that would make for more idiomatic access to the Objects properties/methods.

By the way, I make this suggestion in part because I'm assuming that an Object to_hash method is not in the cards and that we want an Object to behave as much like a Ruby Hash as it reasonably can.