Skip to content

Commit 6460940

Browse files
committed
Rubocop: resolve Style/SlicingWithRange
1 parent ae08faf commit 6460940

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/webmachine/dispatcher/route.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def self.rfc3986_percent_decode(value)
3737
result << if encoded_val.nil?
3838
s.getch
3939
else
40-
[encoded_val[1..-1]].pack('H*')
40+
[encoded_val[1..]].pack('H*')
4141
end
4242
end
4343
result
@@ -154,8 +154,8 @@ def bind(tokens, bindings)
154154
else
155155
return false
156156
end
157-
spec = spec[1..-1]
158-
tokens = tokens[1..-1]
157+
spec = spec[1..]
158+
tokens = tokens[1..]
159159
depth += 1
160160
end
161161
end

0 commit comments

Comments
 (0)