Skip to content

Commit

Permalink
Add support for strscan 0.7.0 installed with Ruby 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
naitoh committed Oct 26, 2024
1 parent a11dbb1 commit c5e0e07
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/rexml/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ def scan(pattern)
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
super(pattern)
end

def match?(pattern)
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
super(pattern)
end

def match_size(pattern)
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
super(pattern)
end
end
end
using StringScannerCheckScanString
Expand Down

0 comments on commit c5e0e07

Please sign in to comment.