You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
1"Why isn't ruby evaluating this as a string?" – the context of the error is not Ruby, it’s JavaScript. And how do we write text literals in JS again ...?C3roe– C3roe2014年09月12日 23:08:47 +00:00Commented Sep 12, 2014 at 23:08
-
@CBroe you are right, but at the time, I was expecting that value to be already parsed as string before it was rendered in javascript.Donato– Donato2014年09月13日 01:37:32 +00:00Commented Sep 13, 2014 at 1:37
-
1Whether or not ruby parsed it as a string doesn’t matter here – JavaScript is the context that you are introducing the value into here, and therefor you have to treat it according to the syntax rules of that context.C3roe– C3roe2014年09月13日 01:52:23 +00:00Commented Sep 13, 2014 at 1:52
lang-rb