diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2009-01-07 17:51:11 +0000 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-01-09 00:14:27 -0800 |
commit | b1530545d259c144770bd8fd7881cb16160c0afc (patch) | |
tree | 69d2e3e7bce61763966e87647234d92b7fbac256 /activesupport/lib | |
parent | 84e6ad3fb9d6a1ba3b71b058e19388de5c67a07f (diff) | |
download | rails-b1530545d259c144770bd8fd7881cb16160c0afc.tar.gz rails-b1530545d259c144770bd8fd7881cb16160c0afc.tar.bz2 rails-b1530545d259c144770bd8fd7881cb16160c0afc.zip |
Fix JSON decoder date-converter regexp [#1662 state:resolved] [Jonathan del Strother]
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/json/decoding.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index fdb219dbf7..9da4048272 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -16,7 +16,7 @@ module ActiveSupport protected # matches YAML-formatted dates - DATE_REGEX = /^\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?$/ + DATE_REGEX = /^(?:\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?)$/ # Ensure that ":" and "," are always followed by a space def convert_json_to_yaml(json) #:nodoc: |