From: mental@... Date: 2005-12-20T07:29:17+09:00 Subject: Re: Point an element in Hash Object Quoting Daniel Sheppard : > instance_methods.each {|m| undef_method m unless /__.*__/ === m} Just as an aside, I'm wondering whether this is the best form of that particular idiom. Probably what people _mean_ when they use /__.*__/ is "match any names _starting and ending_ with double underscores", but that's not what that regexp does -- you'd need to write /^__.*__$/ instead. I usually stick with /^__/ instead, as "starts with double underscores" seems to be sufficient in all interesting cases. Other thoughts? -mental