8000 Add support for strscan 0.7.0 installed with Ruby 2.6 · ruby/rexml@c5e0e07 · GitHub
[go: up one dir, main page]

Skip to content

Commit c5e0e07

Browse files
committed
Add support for strscan 0.7.0 installed with Ruby 2.6
1 parent a11dbb1 commit c5e0e07

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/rexml/source.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,16 @@ def scan(pattern)
1818
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
1919
super(pattern)
2020
end
21+
22+
def match?(pattern)
23+
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
24+
super(pattern)
25+
end
26+
27+
def match_size(pattern)
28+
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
29+
super(pattern)
30+
end
2131
end
2232
end
2333
using StringScannerCheckScanString

0 commit comments

Comments
 (0)
0