cappuccino/cappuccino — pull request #1828 by ahankinson (2013-03-07 05:35:38+00:00)
Title: Allow CPDecimal to handle decimal numbers with leading zeros

Without this fix, CPDecimal will return NaN for numbers that have leading zeros, e.g., 0123.

This fix changes the matching regex to allow leading zeros to pass. This is then converted to a proper number later on, e.g., "0123" => 123. This is in line with Cocoa behaviour.

This commit also includes updated unit tests.