censive 0.15 → 0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/censive.gemspec +1 -1
- data/lib/censive.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88b2018e7ca027d44e36061d9cdc983b56e510632bc125ca632b85fbdc15999b
|
4
|
+
data.tar.gz: 3ec807310f681afdec72505269c23a6a6d9b0262134dbbcd0b16cc6406c9fc50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0110e0ff7dc4f902ede1c7086e6431d3671f1c5886c6947e493bc85ad48bda3232d3604b269703ad3bfdb0d7b1d180cb55ea12fdf06bcc9729a1d67d2cd85a7
|
7
|
+
data.tar.gz: 90dbb68deed9124a723eba91574f46829bf870277f874433ad34fc63dfb4376a8bda243b9fdbb86fbfee90e18bd169e4b8cc97fa6f6f3dac43bbc2125dac877d
|
data/censive.gemspec
CHANGED
data/lib/censive.rb
CHANGED
@@ -43,6 +43,7 @@ class Censive < StringScanner
|
|
43
43
|
strip: false , # strip fields when reading
|
44
44
|
**opts # grab bag
|
45
45
|
)
|
46
|
+
str = File.read(str) if str =~ /\A.{,100}\z/
|
46
47
|
super(str || "")
|
47
48
|
reset
|
48
49
|
|
@@ -86,8 +87,7 @@ class Censive < StringScanner
|
|
86
87
|
token << @quote and next if scan(@quote)
|
87
88
|
break if scan(@eoc)
|
88
89
|
@relax or bomb "invalid character after quote"
|
89
|
-
|
90
|
-
token << @quote + quoted + @quote
|
90
|
+
token << @quote + (scan_until(/#{@quote}/o) or bomb "bad inline quote")
|
91
91
|
end
|
92
92
|
elsif scan(@sep) then return @es
|
93
93
|
elsif scan(@eol) then return nil
|