Eric Mahurin wrote:
> I was expecting this to work as a proxy to the Treetop parser:
> 
> class JSONParser
>     def initialize
>         @parser = JsonParser.new
>     end
>     def parse(s)
>         @parser.parse(StringIO.new(s)).value
>     end
> end

You need to pass the string directly, not as a StringIO.
Treetop parses a String, not an IO.