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

Method#parameters returning empty array for some Object methods #583

Closed
ryanong opened this Issue Mar 13, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@ryanong

ryanong commented Mar 13, 2013

Object.instance_method(:kind_of?).parameters == []

it should equal

[[:req]]
Object.instance_methods.map do |method_name|
  m = Object.instance_method(method_name)
  if m.arity != 0 && m.parameters == []
    method_name
  end
end

using the code above I found these methods to have incorrect parameters

[:initialize_clone, :method, :is_a?, :instance_variable_defined?, :instance_variable_get, :instance_variable_set, :public_method, :instance_of?, :!~, :=~, :initialize_dup, :===, :<=>, :eql?, :kind_of?, :==, :equal?, :!=]
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Mar 13, 2013

Member

Investigating. It would be nice (and possible) to show actual argument names for core methods, but I'll do something halfway for now.

Member

headius commented Mar 13, 2013

Investigating. It would be nice (and possible) to show actual argument names for core methods, but I'll do something halfway for now.

@headius headius closed this in 8961e2a Mar 13, 2013

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