Hi, On Tue, Sep 29, 2009 at 6:05 PM, Marc-Andre Lafortune <ruby-core-mailing-list / marc-andre.ca> wrote: > It is intentional. In Ruby 1.9, method names are always returned as > symbols. Ruby 1.8.7+ returns strings and that can not be changed > because this would not be compatible. Great, thanks for the quick clarification! > Other implementations should do the same, and RubySpec should reflect > that duality (indeed Method#name specs are wrong for 1.8.7, I'll fix > them now). Looks like UnboundMethod#name is affected as well, I've just integrated a fix from a user, similar to your change to Method#name rubyspecs. Thanks, --Vladimir > On Tue, Sep 29, 2009 at 11:05 AM, Vladimir Sizikov <vsizikov / gmail.com> wrote: >> Hi everybody, >> >> I'd like to ask for clarification about Method#name behavior. This >> comes from rubyspec area. >> >> In MRI 1.8.7, Method#name returns a String. And the ruby-docs says so >> as well. Some time in the past, MRI 1.9 was also ¨Βετυςξιξη στςιξησ¬ >> it seems. But then, the behavior in 1.9 has been changed to return a >> Symbol. >> >> So, in short: >> 1. 1.8.7: #name returns strings. #methods returns array of strings. >> 2. 1.9: #name returns symbols. #methods returns array of symbols. >> >> Seems consistent across the same versions. >> Is that how it is supposed to be? >> >> But if we are considering 1.8.7 as a step towards 1.9, maybe the >> behavior should be the same for 1.9 and 1.8.7+ branch? >> >> P.S. For various non-MRI implementations, it seems that some return >> strings, and others return symbols, so it would be good to clarify >> this once and for all. >> >> Thanks, >> -Vladimir >> >> > >