summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Frank <flori@ping.de>2012-07-26 09:29:38 +0200
committerFlorian Frank <flori@ping.de>2012-07-26 09:29:38 +0200
commite47ad616f58da2fd59fb6c61b714c3a070c13b3f (patch)
treea61a3f7d9102d592e75247c127fd56dae3fc131e
parent448f31c6787c037fb7139134309316e17bad62e5 (diff)
parenteacea3b7d8fcc22c71a3b35c4a7906c1bfb42d6b (diff)
downloadjson-e47ad616f58da2fd59fb6c61b714c3a070c13b3f.tar.gz
Merge branch 'master' of ssh://gate.dyna.ping.de:50022/git/json
-rw-r--r--ext/json/ext/fbuffer/fbuffer.h2
-rwxr-xr-xtests/test_json_addition.rb2
-rw-r--r--tests/test_json_string_matching.rb6
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/json/ext/fbuffer/fbuffer.h b/ext/json/ext/fbuffer/fbuffer.h
index f7c2b03..0c53296 100644
--- a/ext/json/ext/fbuffer/fbuffer.h
+++ b/ext/json/ext/fbuffer/fbuffer.h
@@ -2,8 +2,8 @@
#ifndef _FBUFFER_H_
#define _FBUFFER_H_
-#include <assert.h>
#include "ruby.h"
+#include <assert.h>
#ifdef HAVE_RUBY_ENCODING_H
#include "ruby/encoding.h"
diff --git a/tests/test_json_addition.rb b/tests/test_json_addition.rb
index cf80866..707aa32 100755
--- a/tests/test_json_addition.rb
+++ b/tests/test_json_addition.rb
@@ -119,7 +119,7 @@ class TestJSONAddition < Test::Unit::TestCase
json_raw_object = raw.to_json_raw_object
hash = { 'json_class' => 'String', 'raw'=> raw_array }
assert_equal hash, json_raw_object
- assert_match(/\A\{.*\}\Z/, json)
+ assert_match(/\A\{.*\}\z/, json)
assert_match(/"json_class":"String"/, json)
assert_match(/"raw":\[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255\]/, json)
raw_again = JSON.parse(json)
diff --git a/tests/test_json_string_matching.rb b/tests/test_json_string_matching.rb
index b8a7169..97e8c07 100644
--- a/tests/test_json_string_matching.rb
+++ b/tests/test_json_string_matching.rb
@@ -28,13 +28,13 @@ class TestJSONStringMatching < Test::Unit::TestCase
t_json = [ t ].to_json
assert_equal [ t ],
JSON.parse(t_json,
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
assert_equal [ t.strftime('%FT%T%z') ],
JSON.parse(t_json,
- :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime })
+ :match_string => { /\A\d{3}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime })
assert_equal [ t.strftime('%FT%T%z') ],
JSON.parse(t_json,
- :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\Z/ => TestTime },
+ :match_string => { /\A\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{4}\z/ => TestTime },
:create_additions => false)
end
end