Fix #to_json for BasicObject Enumerables
Merge pull request #10278 from codeodor/fix-to_json-for-Enumerable

Fix #to_json for BasicObject Enumerables