lib/roda.rb in roda-3.4.0 vs lib/roda.rb in roda-3.5.0
- old
+ new
@@ -720,12 +720,12 @@
# Match the given regexp exactly if it matches a full segment.
def _match_regexp(re)
consume(self.class.cached_matcher(re){re})
end
- # Match the given string to the request path. Regexp escapes the
- # string so that regexp metacharacters are not matched, and recognizes
- # colon tokens for placeholders.
+ # Match the given string to the request path. Matches only if the
+ # request path ends with the string or if the next character in the
+ # request path is a slash (indicating a new segment).
def _match_string(str)
rp = @remaining_path
if rp.start_with?("/#{str}")
last = str.length + 1
case rp[last]