spring 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/spring/application.rb +1 -1
- data/lib/spring/json.rb +25 -28
- data/lib/spring/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f2e2dd87b67447e8ec1404be4f904fe1339e536dabddde397662313a7bb116d
|
4
|
+
data.tar.gz: 467c115d0fff87ded2aa4a7d761419f74ce9b45798f12568e21d97e1b261599f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc3b61d71972b7150fdbf7331ce1e55d447fabecbc4ba55914ce2621a9221fbb913efa31b715f80f77ff807dba06b3f89e26454ef623d8d2bc26af6b6f442a3
|
7
|
+
data.tar.gz: b459527ad5f9301dd75b1e2f5c9d6e6418e7c019c3a0073a4c6e905b9118db5193bcad051bba88fd5f55cbf124037332ed6a940cd857e4c59d67127d02dbb951
|
data/lib/spring/application.rb
CHANGED
data/lib/spring/json.rb
CHANGED
@@ -46,8 +46,6 @@ end
|
|
46
46
|
|
47
47
|
# See https://github.com/kr/okjson for updates.
|
48
48
|
|
49
|
-
require 'stringio'
|
50
|
-
|
51
49
|
# Some parts adapted from
|
52
50
|
# https://golang.org/src/pkg/json/decode.go and
|
53
51
|
# https://golang.org/src/pkg/utf8/utf8.go
|
@@ -468,19 +466,18 @@ private
|
|
468
466
|
|
469
467
|
|
470
468
|
def strenc(s)
|
471
|
-
t =
|
472
|
-
t.putc(?")
|
469
|
+
t = '"'.b
|
473
470
|
r = 0
|
474
471
|
|
475
472
|
while r < s.length
|
476
473
|
case s[r]
|
477
|
-
when ?" then t
|
478
|
-
when ?\\ then t
|
479
|
-
when ?\b then t
|
480
|
-
when ?\f then t
|
481
|
-
when ?\n then t
|
482
|
-
when ?\r then t
|
483
|
-
when ?\t then t
|
474
|
+
when ?" then t << '\\"'
|
475
|
+
when ?\\ then t << '\\\\'
|
476
|
+
when ?\b then t << '\\b'
|
477
|
+
when ?\f then t << '\\f'
|
478
|
+
when ?\n then t << '\\n'
|
479
|
+
when ?\r then t << '\\r'
|
480
|
+
when ?\t then t << '\\t'
|
484
481
|
else
|
485
482
|
c = s[r]
|
486
483
|
# In ruby >= 1.9, s[r] is a codepoint, not a byte.
|
@@ -490,14 +487,14 @@ private
|
|
490
487
|
if c.ord < Spc.ord
|
491
488
|
c = "\\u%04x" % [c.ord]
|
492
489
|
end
|
493
|
-
t
|
490
|
+
t << c
|
494
491
|
rescue
|
495
|
-
t
|
492
|
+
t << Ustrerr
|
496
493
|
end
|
497
494
|
elsif c < Spc
|
498
|
-
t
|
495
|
+
t << "\\u%04x" % c
|
499
496
|
elsif Spc <= c && c <= ?~
|
500
|
-
t
|
497
|
+
t << c
|
501
498
|
else
|
502
499
|
n = ucharcopy(t, s, r) # ensure valid UTF-8 output
|
503
500
|
r += n - 1 # r is incremented below
|
@@ -505,8 +502,8 @@ private
|
|
505
502
|
end
|
506
503
|
r += 1
|
507
504
|
end
|
508
|
-
t
|
509
|
-
t
|
505
|
+
t << '"'
|
506
|
+
t
|
510
507
|
end
|
511
508
|
|
512
509
|
|
@@ -531,7 +528,7 @@ private
|
|
531
528
|
|
532
529
|
# 1-byte, 7-bit sequence?
|
533
530
|
if c0 < Utagx
|
534
|
-
t
|
531
|
+
t << c0
|
535
532
|
return 1
|
536
533
|
end
|
537
534
|
|
@@ -544,8 +541,8 @@ private
|
|
544
541
|
# 2-byte, 11-bit sequence?
|
545
542
|
if c0 < Utag3
|
546
543
|
raise Utf8Error if ((c0&Umask2)<<6 | (c1&Umaskx)) <= Uchar1max
|
547
|
-
t
|
548
|
-
t
|
544
|
+
t << c0
|
545
|
+
t << c1
|
549
546
|
return 2
|
550
547
|
end
|
551
548
|
|
@@ -559,9 +556,9 @@ private
|
|
559
556
|
if c0 < Utag4
|
560
557
|
u = (c0&Umask3)<<12 | (c1&Umaskx)<<6 | (c2&Umaskx)
|
561
558
|
raise Utf8Error if u <= Uchar2max
|
562
|
-
t
|
563
|
-
t
|
564
|
-
t
|
559
|
+
t << c0
|
560
|
+
t << c1
|
561
|
+
t << c2
|
565
562
|
return 3
|
566
563
|
end
|
567
564
|
|
@@ -574,16 +571,16 @@ private
|
|
574
571
|
if c0 < Utag5
|
575
572
|
u = (c0&Umask4)<<18 | (c1&Umaskx)<<12 | (c2&Umaskx)<<6 | (c3&Umaskx)
|
576
573
|
raise Utf8Error if u <= Uchar3max
|
577
|
-
t
|
578
|
-
t
|
579
|
-
t
|
580
|
-
t
|
574
|
+
t << c0
|
575
|
+
t << c1
|
576
|
+
t << c2
|
577
|
+
t << c3
|
581
578
|
return 4
|
582
579
|
end
|
583
580
|
|
584
581
|
raise Utf8Error
|
585
582
|
rescue Utf8Error
|
586
|
-
t
|
583
|
+
t << Ustrerr
|
587
584
|
return 1
|
588
585
|
end
|
589
586
|
|
data/lib/spring/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spring
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Leighton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|