rubyjs / therubyrhino

Embed the Mozilla Rhino Javascript interpreter into Ruby
153 stars 40 forks source link

Symbols are not converted to JavaScript strings with .call(*args) #43

Open eregon opened 2 years ago

eregon commented 2 years ago

From https://github.com/rails/execjs/pull/110#issuecomment-1023121550

Unlike all other execjs backends, therubyrhino currently does not convert :some_symbol to "some_symbol" when passing it to JavaScript. I think it would make sense to fix it in this gem.

eregon commented 2 years ago

Another possibility is to have this behavior only for ExecJS in https://github.com/rails/execjs/blob/39118e25f9c2ee40e475ac64653e66be6f4aecd0/lib/execjs/ruby_rhino_runtime.rb#L35. What do you think is better/makes more sense?