Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed warning about unused variable.

This commit removes below warnings.

* "warning: assigned but unused variable"
  • Loading branch information...
commit f6734b04bc623554f1f9bd56c5a42cafe1016e1f 1 parent 72bf6c0
@kachick kachick authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/addressable/template.rb
View
8 lib/addressable/template.rb
@@ -515,11 +515,11 @@ def variable_defaults
private
def ordered_variable_defaults
@ordered_variable_defaults ||= (
- expansions, expansion_regexp = parse_template_pattern(pattern)
+ expansions, _ = parse_template_pattern(pattern)
expansions.map do |capture|
- _, operator, varlist = *capture.match(EXPRESSION)
+ _, _, varlist = *capture.match(EXPRESSION)
varlist.split(',').map do |varspec|
- name = varspec[VARSPEC, 1]
+ varspec[VARSPEC, 1]
end
end.flatten
)
@@ -553,7 +553,7 @@ def transform_partial_capture(mapping, capture, processor = nil)
_, operator, varlist = *capture.match(EXPRESSION)
is_first = true
varlist.split(',').inject('') do |acc, varspec|
- _, name, modifier = *varspec.match(VARSPEC)
+ _, name, _ = *varspec.match(VARSPEC)
value = mapping[name]
if value
operator = '&' if !is_first && operator == '?'
Please sign in to comment.
Something went wrong with that request. Please try again.