argument truncation specs

3 views
Skip to first unread message

Charles Lowell

unread,
Jun 16, 2012, 3:42:48 AM6/16/12
to javascript-...@googlegroups.com, therub...@googlegroups.com
Hi,

I was looking at the argument truncation specs on master.


It seems like there is a small bug. If the default ruby access is to translate Ruby arrays to javascript arrays, then shouldn't the context eval return a JS::Array ?

I think it can be fixed with just calling to_a on the results, but just wanted to make sure.

cheers,
Charles

Charles Lowell 
thefrontside.net | twitter: @cowboyd | github: cowboyd




Karol Bucek

unread,
Jun 16, 2012, 5:40:15 AM6/16/12
to javascript-...@googlegroups.com, therub...@googlegroups.com

 Hi Charlie, you're right it's a side effect in these specs whether it's actually a Ruby Array.

On the other hand Ruby -> JS translates Array into a JS array but than there's the opposite (JS -> Ruby) conversion as the array comes out into the Ruby world ?
Not sure maybe that should be speced, but as I said you're right these specs should not care whether it's actually a Ruby Array instance ... feel free to change it.

K.
Reply all
Reply to author
Forward
0 new messages