From: Joel VanderWerf Date: 2004-04-26T04:06:06+09:00 Subject: Re: rexml: how to get element type? Mark Hubbart wrote: > (obj.methods - Object.new.methods).sort > > I added that to my .irbrc file defined as Object#less_methods. You can use Object.instance_methods instead, since Object.instance_methods == Object.new.methods Maybe this would be convenient: class Object def less_methods(cl=Object) methods - cl.instance_methods end end 3.less_methods(Numeric) # =>["%", "<<", ">>", "prec_i", "&", "to_sym", "*", "+", "times", "-", "prec_f", "/", "upto", "|", "~", "chr", "to_i", "succ", "^", "**", "to_f", "prec", "size", "next", "id2name", "[]", "downto"]