cucumber/gherkin — pull request #239 by joshughes (2013-03-13 02:21:37+00:00)
Title: Fix Array Out of bounds for JSONFormatter when before hook is present 

The release of 1.1.3 showed a flaw in the JSONFormatter. The flaw was that we are always trying to add hooks to a scenario when in fact a before hook can be run before a scenario is known to the JSONFormatter.

This pull request fixes that issue by storing the before hooks until we have a scenario to add them to. In the process it broke the JSON parser so I adjusted to code to ensure all current tests pass.

This will fix the issue in cucumber JVM...
https://github.com/cucumber/cucumber-jvm/issues/476

It will also allow the following test to pass...
https://github.com/cucumber/cucumber-jvm/pull/478