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

Argument error #9

Open
nextgenappsllc opened this issue Feb 2, 2016 · 2 comments
Open

Argument error #9

nextgenappsllc opened this issue Feb 2, 2016 · 2 comments

Comments

@nextgenappsllc
Copy link

I am getting the following error when calling methods like disabled? and locked? on certain users:

ArgumentError: method name must be a Symbol but String is given

The fix seems to be not accessing variables in dot notation and instead I extended the class to include:

def is_locked?
!self[:lockoutTime].nil? && self[:lockoutTime].to_i != 0
end

def is_disabled?
self[:userAccountControl].to_i & UAC_ACCOUNT_DISABLED != 0
end

Anyone else getting this error? I am running ruby 2.3 by the way

@arohr
Copy link

arohr commented Jan 6, 2017

Yes, getting this error too. Running Ruby 2.3.1.

@cmoylan
Copy link

cmoylan commented Apr 11, 2017

Also getting this error on 2.3.4

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

No branches or pull requests

3 participants