 <p>This change in behavior in p392 is due to a <a href="https://github.com/flori/json/commit/d0a62f3ced7560daba2ad546d83f0479a5ae2cf2">security fix</a>. See the <a href="http://www.ruby-lang.org/en/news/2013/02/22/json-dos-cve-2013-0269/">p392 release announcement</a> for more details.</p> <p>Your code works with the addition of the <code>:create_additions</code> option in your call to <code>JSON.parse</code>:</p> <pre><code>require 'json' class Range def to_json(*a) { 'json_class' =&gt; self.class.name, 'data' =&gt; [ first, last, exclude_end? ] }.to_json(*a) end def self.json_create(o) new(*o['data']) end end puts JSON.parse((1..10).to_json, :create_additions =&gt; true) == (1..10) </code></pre>