Skip to content

Commit 3f2e2aa

Browse files
committed
Remove duplicate 'rfc3986_percent_decode' method
1 parent 20a7f15 commit 3f2e2aa

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

lib/webmachine/dispatcher/route.rb

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,6 @@ def self.rfc3986_percent_decode(value)
4343
result
4444
end
4545

46-
# Decode a string using the scheme described in RFC 3986 2.1. Percent-Encoding (https://www.ietf.org/rfc/rfc3986.txt)
47-
def self.rfc3986_percent_decode(value)
48-
s = StringScanner.new(value)
49-
result = ""
50-
until s.eos?
51-
encoded_val = s.scan(/%([0-9a-fA-F]){2}/)
52-
result << if encoded_val.nil?
53-
s.getch
54-
else
55-
[encoded_val[1..-1]].pack("H*")
56-
end
57-
end
58-
result
59-
end
60-
6146
# Creates a new Route that will associate a pattern to a
6247
# {Resource}.
6348
#

0 commit comments

Comments
 (0)