Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long Method should count nested assignments #32

Closed
kevinrutherford opened this issue Jun 15, 2009 · 1 comment
Closed

Long Method should count nested assignments #32

kevinrutherford opened this issue Jun 15, 2009 · 1 comment

Comments

@kevinrutherford
Copy link
Collaborator

The following code includes 3 nested assignments, yet none of these contribute to the method's "length":

def parse(arg, argv, &error)
  if !(val = arg) and (argv.empty? or /\A-/ =~ (val = argv[0]))
    return nil, block, nil
  end
  opt = (val = parse_arg(val, &error))[1]
  val = conv_arg(*val)
  if opt and !arg
    argv.shift
  else
    val[0] = nil
  end
  val
end

The metho'ds length is reported as 6, but should be 9.

@troessner
Copy link
Owner

4 years and not a single comment whatsoever -> closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants