[MacRuby] #1118: Object.instance_methods does not return the :hash or :class methods
MacRuby
ruby-noreply at macosforge.org
Tue Jan 18 09:01:50 PST 2011
#1118: Object.instance_methods does not return the :hash or :class methods
------------------------------------------+---------------------------------
Reporter: smorss@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
------------------------------------------+---------------------------------
I am running MacRuby 0.8.
If I run "Object.instance_methods", it returns:
[:clear_history!, :h!, :history!, :h, :history, :to_plist, :Complex,
:Rational, :enum_for, :to_enum, :object_id, :__id__,
:define_singleton_method, :public_method, :method, :extend,
:respond_to_missing?, :respond_to?, :public_send, :send, :__send__,
:instance_exec, :instance_eval, :__callee__, :__method__, :tap, :is_a?,
:kind_of?, :instance_of?, :instance_variable_defined?,
:instance_variable_set, :instance_variable_get, :instance_variables,
:public_methods, :private_methods, :protected_methods, :singleton_methods,
:methods, :inspect, :to_s, :untrusted?, :untrust, :trust, :frozen?,
:freeze, :untaint, :tainted?, :taint, :__type__, :dup, :clone, :<=>,
:eql?, :!~, :=~, :===, :nil?, :!=, :!, :==, :equal?]
The :hash and :class methods are missing. If I run "Object.new.methods",
the result does not include the :class or :hash methods either. Still,
the two methods are callable (e.g. "Object.new.class" returns NSObject).
Subclasses of Object(NSObject), do include the :class and :hash methods in
their instance methods. It's just the Object(NSObject) class with the odd
behavior.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1118>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list