overwrites existing another j method
in ActionView context.
FYI: It seems this global j is called in other contexts. https://github.com/flori/json/blob/b50b1bdeae/lib/json/common.rb#L395
Attached a patch that removes j alias for json_escape because this j is no longer available for app developers, and not used inside the framework (maybe those who are using output_safety.rb out of the Rails box would be affected... but who does?).
Remove j alias for ERB::Util.json_escape
While I agree it is confusing having two methods called j, j is also a module function for ERB::Util. And it is common for ERB::Util have aliases based on the escape method: http://www.ruby-doc.org/stdlib-1.9.2/libdoc/erb/rdoc/ERB/Util.html
3) Deprecate j in all cases
But I am not sure. What do you think? /cc @jeremy
j mirrors h and is meant to only work in views. Global Kernel#j seems terrible: https://github.com/flori/json/blob/b50b1bdeae/lib/json/common.rb#L395
+1 to consolidating the implementations, in any case.
If j is changing to js and another j is taking its place, the documentation has to be eye popping since it'll surely be confusing.
Add CHANGELOG entry for #3578 [ci skip]