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

Ruby defArgs omit regex actually includes no-arg methods in omit #50

willbryant opened this Issue Feb 10, 2014 · 1 comment


None yet
2 participants

willbryant commented Feb 10, 2014

irb(main):001:0> "def foo" =~ /^[\s\t]*def\s+\w+\s*[^()]*(#+.*)*$/
=> 0

So we need a \w in there somewhere, how about:


Seems to work better:

irb(main):006:0> "def foo" =~ /^[\s\t]*def\s+\w+\s+\w[^()]*(#+.*)*$/
=> nil
irb(main):007:0> "def foo(a, b)" =~ /^[\s\t]*def\s+\w+\s+\w[^()]*(#+.*)*$/
=> nil
irb(main):008:0> "def foo a, b" =~ /^[\s\t]*def\s+\w+\s+\w[^()]*(#+.*)*$/
=> 0

This comment has been minimized.


outsideris commented Feb 12, 2014

you are right. I was think about no-arg.

@outsideris outsideris self-assigned this Feb 12, 2014

@outsideris outsideris added the bug label Feb 12, 2014

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