[MacRuby-devel] Fixing ext/json
dan sinclair
dj2 at everburning.com
Mon Aug 17 19:37:08 PDT 2009
Hello,
I've been taking a poke at ext/json for the last few days attempting
to get JSON support working again. I've got it compiling but have run
into an issue with memory management and the garbage collector that
I've been unable to get past.
I've attached my current diff of changes to get JSON working. With
this diff applied requiring json will crash with:
unknown: [BUG] destination 0x100feb300 isn't in the auto zone
I've tracked it down to ext/json/lib/json/common.rb line 59 (at least,
it never gets past that line that I've seen)
self.state = generator::State
Commenting out this line gets further (require works and I can turn
{"a" => 1} into JSON. Missing module_function causes JSON.parse to
fail).
My test file is:
puts "Requiring"
require 'json'
puts "Required"
require 'pp'
puts "to_json"
a = {"a" => 1}.to_json
puts "parse"
pp JSON.parse(a)
puts "done"
Thoughts?
Thanks,
dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: json.diff
Type: application/octet-stream
Size: 28312 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20090817/e63a6f8b/attachment-0001.obj>
-------------- next part --------------
More information about the MacRuby-devel
mailing list