Feature #1082

add Object#singleton_class method

Added by Suraj Kurapati about 5 years ago. Updated almost 3 years ago.

[ruby-core:21702]
Status:Closed
Priority:Normal
Assignee:Yukihiro Matsumoto
Category:core
Target version:1.9.2

Description

=begin
Please add Object#singleton_class method to the Ruby API.

This method would allow us to write:

hello.singleton_class

Instead of always having to write:

(class << hello; self; end)

Furthermore, the name "singleton_class" should be used
to minimize disruption to the existing Ruby API, which
already uses the name "singleton":

Object.instancemethods.grep(/singleton/)
=> [:singleton
methods, :definesingletonmethod]

RUBY_DESCRIPTION
=> "ruby 1.9.1p0 (2009-01-20 revision 21700) [i686-linux]"

Thanks for your consideration.
=end

History

#1 Updated by Radosław Bułat about 5 years ago

=begin
+1
"Singleton" is most popular name for describe... singleton classes (sometimes named eigenclass, virtual class, metaclass). To be consistent with singletonmethods, definesingletonmethod it would be very nice to name it singletonclass.
=end

#2 Updated by Kornelius Kalnbach about 5 years ago

=begin
+1
I thought this feature was already added to 1.9? class << self; self; end is not very helpful for beginners.

What about singletonclasseval? (Or singleton_class.eval, for that matter...)
=end

#3 Updated by David Black about 5 years ago

=begin
Hi --

On Sun, 1 Feb 2009, Kornelius Kalnbach wrote:

Issue #1082 has been updated by Kornelius Kalnbach.

+1
I thought this feature was already added to 1.9? class << self; self; end is not very helpful for beginners.

What about singletonclasseval? (Or singleton_class.eval, for that matter...)

singletonclass.classeval. The less it's treated like a special case,
the better.

David

--
David A. Black / Ruby Power and Light, LLC
Ruby/Rails consulting & training: http://www.rubypal.com
Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2)

http://www.wishsight.com => Independent, social wishlist management!

=end

#4 Updated by Koichi Sasada about 5 years ago

  • Assignee set to Yukihiro Matsumoto

=begin

=end

#5 Updated by Suraj Kurapati over 4 years ago

=begin
Hi Matz,

Any thoughts on this feature request?

hello.singleton_class == (class << hello; self; end)

Thanks for your consideration.
=end

#6 Updated by Yukihiro Matsumoto over 4 years ago

=begin
Hi,

In message "Re: [Feature #1082] add Object#singleton_class method"
on Sun, 3 Jan 2010 04:53:36 +0900, Suraj Kurapati redmine@ruby-lang.org writes:

|Any thoughts on this feature request?
|
| hello.singleton_class == (class << hello; self; end)
|
|Thanks for your consideration.

We haven't met any consensus of a name for the method.
singleton_class, singletonclass, eigenclass, or whatever.

                        matz.

=end

#7 Updated by Kornelius Kalnbach over 4 years ago

=begin
On 04.01.10 07:25, Yukihiro Matsumoto wrote:

|Any thoughts on this feature request?
|
| hello.singleton_class == (class << hello; self; end)
|
|Thanks for your consideration.

We haven't met any consensus of a name for the method.
singletonclass, singletonclass, eigenclass, or whatever.
_why suggested "metaclass" back in 2005. But since we already have
#define
singletonmethod and #singletonmethods, "singleton_class"
should be the name of it.

I'd like to see it included in future Ruby versions.

[murphy]

=end

#8 Updated by Magnus Holm over 4 years ago

=begin
+1 for whatever. (Okay then, maybe singleton_class is better)

//Magnus Holm

On Mon, Jan 4, 2010 at 07:25, Yukihiro Matsumoto matz@ruby-lang.org wrote:

Hi,

In message "Re: [Feature #1082] add Object#singleton_class method"
   on Sun, 3 Jan 2010 04:53:36 +0900, Suraj Kurapati redmine@ruby-lang.org writes:

|Any thoughts on this feature request?
|
|  hello.singleton_class == (class << hello; self; end)
|
|Thanks for your consideration.

We haven't met any consensus of a name for the method.
singleton_class, singletonclass, eigenclass, or whatever.

                                                       matz.

=end

#9 Updated by Yusuke Endoh over 4 years ago

=begin
Hi,

2010/1/4 Yukihiro Matsumoto matz@ruby-lang.org:

We haven't met any consensus of a name for the method.
singleton_class, singletonclass, eigenclass, or whatever.

The draft of ruby-std uses eigenclass. (13.4 Eigenclass)

--
Yusuke ENDOH mame@tsg.ne.jp

=end

#10 Updated by Kornelius Kalnbach over 4 years ago

=begin
On 04.01.10 17:28, Haase, Konstantin wrote:

+1 for metaclass, as is it compatible with ActiveSupport, Rubinius
and _why.

The current methods are all named singleton*, so anything else than
singleton
class would be inconsistent.

ActiveSupport can (and will) still implement metaclass. And I didn't
know Rubinius was having its own Ruby language. Compatibility with
_why's metaid can be installed as a gem.

Also, it confuses people with a Python background.
Is that a plus? A metaclass are just the class of a class. I think _why
didn't pick the best name.

"Eigenclass" still sounds like a mathematician's joke to me ;)

[murphy]

=end

#11 Updated by Jeremy Kemper over 4 years ago

=begin
On Mon, Jan 4, 2010 at 10:52 AM, Kornelius Kalnbach murphy@rubychan.de wrote:

On 04.01.10 17:28, Haase, Konstantin wrote:

+1 for metaclass, as is it compatible with ActiveSupport, Rubinius
and _why.

The current methods are all named singleton*, so anything else than
singleton
class would be inconsistent.

Agreed.

It's an appropriate name that makes its role in Ruby easier to understand.

"Meta" and "eigen" are less concrete and make Ruby seem more like
arcane spellbook.

ActiveSupport can (and will) still implement metaclass. And I didn't
know Rubinius was having its own Ruby language. Compatibility with
_why's metaid can be installed as a gem.

Active Support always prefers Ruby's choice and will gladly change.

Best,
jeremy

=end

#12 Updated by Yukihiro Matsumoto over 4 years ago

=begin
Hi,

In message "Re: Re: [Feature #1082] add Object#singletonclass method"
on Tue, 5 Jan 2010 02:05:19 +0900, Yusuke ENDOH mame@tsg.ne.jp writes:
|
|2010/1/4 Yukihiro Matsumoto matz@ruby-lang.org:
|> We haven't met any consensus of a name for the method.
|> singleton
class, singletonclass, eigenclass, or whatever.
|
|The draft of ruby-std uses eigenclass. (13.4 Eigenclass)

Of course I know. I was right there when we made the decision.

                        matz.

=end

#13 Updated by Yukihiro Matsumoto over 4 years ago

=begin
Hi,

In message "Re: Re: [Feature #1082] add Object#singleton_class method"
on Mon, 4 Jan 2010 15:46:32 +0900, Kornelius Kalnbach murphy@rubychan.de writes:

|why suggested "metaclass" back in 2005. But since we already have
|#define
singletonmethod and #singletonmethods, "singleton_class"
|should be the name of it.

"metaclass" means "a class of a class" but "that something" is not
really a metaclass, since it's not only for classes, but for any
object. "singleton_class" is too easily confused with a class appears
in the Singleton Pattern.

|I'd like to see it included in future Ruby versions.

Me too. But I will wait for the right word.

                        matz.

=end

#14 Updated by Shugo Maeda over 4 years ago

=begin
Hi,

2010/1/5 Yusuke ENDOH mame@tsg.ne.jp:

We haven't met any consensus of a name for the method.
singleton_class, singletonclass, eigenclass, or whatever.

The draft of ruby-std uses eigenclass.  (13.4 Eigenclass)

Yes, it does. However, we can choose another word.

I prefer singleton_class than eigenclass. I suppose that "singleton
class" is not so confusing with a class which implements the Singleton
pattern because the word singleton remind Ruby users of singleton
methods rather than the Singleton pattern.

--
Shugo Maeda

=end

#15 Updated by Yukihiro Matsumoto over 4 years ago

=begin
Hi,

In message "Re: Re: [Feature #1082] add Object#singleton_class method"
on Tue, 5 Jan 2010 11:26:41 +0900, Shugo Maeda shugo@ruby-lang.org writes:

|I prefer singleton_class than eigenclass. I suppose that "singleton
|class" is not so confusing with a class which implements the Singleton
|pattern because the word singleton remind Ruby users of singleton
|methods rather than the Singleton pattern.

Basically, I agree. But I cannot deny the fact that we already have
singleton.rb in the distribution, which provide Singleton class. I
confess I did. Probably I shouldn't have.

                        matz.

=end

#16 Updated by Austin Ziegler over 4 years ago

=begin
On Mon, Jan 4, 2010 at 9:41 PM, Yukihiro Matsumoto matz@ruby-lang.org wrote:

In message "Re: Re: [Feature #1082] add Object#singletonclass        method"
   on Tue, 5 Jan 2010 11:26:41 +0900, Shugo Maeda shugo@ruby-lang.org writes:
|I prefer singleton
class than eigenclass.  I suppose that "singleton
|class" is not so confusing with a class which implements the Singleton
|pattern because the word singleton remind Ruby users of singleton
|methods rather than the Singleton pattern.
Basically, I agree.  But I cannot deny the fact that we already have
singleton.rb in the distribution, which provide Singleton class.  I
confess I did.  Probably I shouldn't have.

I just did a quick check of 1.8's singleton.rb, and Singleton is a
module, not a class (which I'm sure you really knew, but it's
important to my point).

I think that it's easy enough to say that every object can have a
singleton_class, which sits between the object and any of its
ancestors; not every object, however, implements the Singleton Pattern
through the Singleton module.

That said, taking my interpretation above (that the
{singleton,eigen}class sits between the object and its ancestors, if
it's correct) a quick thesaurus check suggests either:

=end

#17 Updated by Jeremy Kemper over 4 years ago

=begin
On Mon, Jan 4, 2010 at 6:41 PM, Yukihiro Matsumoto matz@ruby-lang.org wrote:

Hi,

In message "Re: Re: [Feature #1082] add Object#singleton_class        method"
   on Tue, 5 Jan 2010 11:26:41 +0900, Shugo Maeda shugo@ruby-lang.org writes:

|I prefer singleton_class than eigenclass.  I suppose that "singleton
|class" is not so confusing with a class which implements the Singleton
|pattern because the word singleton remind Ruby users of singleton
|methods rather than the Singleton pattern.

Basically, I agree.  But I cannot deny the fact that we already have
singleton.rb in the distribution, which provide Singleton class.  I
confess I did.  Probably I shouldn't have.

That can't be denied, but I think this confusion is mostly hypothetical.

I sympathize with your aesthetic concerns with collision, but the term
"singleton class" has been in common usage for years and has proven
understandable to new Ruby users crossing the "class << self" chasm
for the first time.

It's a good name that has stood the test of time. Let's officially
adopt what we've already unofficially chosen.

jeremy

=end

#18 Updated by Kornelius Kalnbach over 4 years ago

=begin
why not add both? eigenclass could be an alias for singleton_class.
[murphy]

=end

#19 Updated by Benoit Daloze over 4 years ago

=begin
Hi,

2010/1/5 James Edward Gray II james@graysoftinc.com

Surely, seeing:

obj.badnameclass

is preferable to:

class << obj; self end

and we can do even better than that with singleton_class. :)

James Edward Gray II

+1 for eigenclass:

I think something is confusing for me between

(1) class << obj
self
end

and

(2) class << MyClass
def method # this is a class method, a method that MyClass-Object owns,
alone (without needing to make an instance to use)
end
end

Here, I feel far less confusing the eigenclass.
Well, the syntax we are trying to name,
is describing a class who allow us to write methods that concern the object
globally(1), as a single object(2).

Eigenclass means then the "proper"(~ global,single) class to that Object, a
class who concerns only one Object, but that Object doesn't look like a
singleton especially, it's just a single object. We didn't build it with a
class describing it (or that doesn't matter), we are just speaking to it
directly, ignoring what's around.

For me, singleton is confusing, and wrong, as it has a name of "created and
it's the only one of a 'class' ", while that 'class' means nothing here.

"eigenclass" seem, according to me, the only alternative in the 3 proposed
to name both the 2 situations above.
(While I think we'll still use a lot of class << MyClass; def m(); end; end,
that is kind of very useful)

"singletonclass" is already used in Ruby, yes, but not very wide, and it
can still change if needed:
$> ri singleton
1 Numeric#singleton
methodadded
2 Object#define
singletonmethod
3 Object#singleton
methods
4 RDoc::Generator::Method#singleton
(I must admit a singleton method SEEMS more clear here than a eigen
method..., but it would not be obfuscating neither I think)

And the last reason: eigenclass is original, sounds cool, is not so
confusing and unique (like Ruby) !

Here was my piece of advice to name this.

Benoit Daloze

Hi,2010/1/5 James Edward Gray II <james@graysoftinc.com>
 Surely, seeing:

 obj.badnameclass

is preferable to:

 class << obj; self end

and we can do even better than that with singletonclass.  :)

James Edward Gray II
+1 for eigenclass:I think something is confusing for me between(1) class << obj  selfendand(2) class << MyClass  def method # this is a class method, a method that MyClass-Object owns, alone (without needing to make an instance to use)
  endendHere, I feel far less confusing the eigenclass.Well, the syntax we are trying to name,is describing a class who allow us to write methods that concern the object globally(1), as a single object(2).
Eigenclass means then the "proper"(~ global,single) class to that Object, a class who concerns only one Object, but that Object doesn't look like a singleton especially, it's just a single object. We didn't build it with a class describing it (or that doesn't matter), we are just speaking to it directly, ignoring what's around.
For me, singleton is confusing, and wrong, as it has a name of "created and it's the only one of a 'class' ", while that 'class' means nothing here."eigenclass" seem, according to me, the only alternative in the 3 proposed to name both the 2 situations above.
(While I think we'll still use a lot of class << MyClass; def m(); end; end, that is kind of very useful)"singleton
class" is already used in Ruby, yes, but not very wide, and it can still change if needed:
$> ri singleton  1 Numeric#singletonmethodadded  2 Object#definesingletonmethod  3 Object#singleton_methods  4 RDoc::Generator::Method#singleton(I must admit a singleton method SEEMS more clear here than a eigen method..., but it would not be obfuscating neither I think)
And the last reason: eigenclass is original, sounds cool, is not so confusing and unique (like Ruby) !Here was my piece of advice to name this.Benoit Daloze

=end

#20 Updated by Ammar Ali over 4 years ago

=begin
Suggesting new terms might be completely unwelcome, but...

The distinction between a "regular" class and a singleton/eigen/whatever class appears similar to the distinction between phonetic and phonemic in phonology. Some shorten these terms and broaden their meaning; "emic" (loosley meaning below the surface) and "etic" (loosely meaning on the surface). Would emic-class make sense to others?

Also from linguistics, the prefix "allo-" generally means "differing from the normal"... so I wonder if "alloclass" is a good possible name.

Just a thought,
ammar
=end

#21 Updated by Rick DeNatale over 4 years ago

=begin
On Tue, Jan 5, 2010 at 5:25 PM, Ammar Ali redmine@ruby-lang.org wrote:

Issue #1082 has been updated by Ammar Ali.

Suggesting new terms might be completely unwelcome, but...

The distinction between a "regular" class and a singleton/eigen/whatever class appears similar to the distinction between phonetic  and phonemic in phonology. Some shorten these terms and broaden their meaning; "emic" (loosley meaning below the surface) and "etic" (loosely meaning on the surface). Would emic-class make sense to others?

Also from linguistics, the prefix "allo-" generally means "differing from the normal"... so I wonder if "alloclass" is a good possible name.

In the edition of the Pickaxe corresponding to Ruby 1.8. Dave Thomas
used the term Virtual class, which never seems to get mentioned in
these discussions.

Not that I think that that's the right term either, in fact, it's
really the opposite of the characteristic which I think the 'classes'
which provide singleton methods, and the 'classes' which provide class
methods (which IMHO really aren't singleton methods because they apply
to subclasses as well) share.

There's an old CS joke.

If it's there and you can see it, it's real,
If it's not there and you can see it, it's virtual
If it's there and you can't see it, it's transparent,
If it's not there and you can't see it it's gone.

I would suggest transparent_class for singleton classes whether they
are singleton classes of regular objects (which really do provide
methods ONLY for one object) or 'singleton' classes of Class objects.
The key aspect is that the Ruby implementation does its best to hide
these from the Ruby programmer.

Or perhaps, since in a kind of heisenberg effect, providing an
official method to make them visible means that they wouldn't really
be totally transparent, perhaps hiddenclass, and for
transparent/hidden classes which are the (meta?)class of a class, a
hiddden
superclass method, so that

String.hiddenclass.hiddensuperclass would return Object.hidden_class

--
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale

=end

#22 Updated by David Black over 4 years ago

=begin
Hi --

On Tue, 5 Jan 2010, Yukihiro Matsumoto wrote:

Hi,

In message "Re: Re: [Feature #1082] add Object#singleton_class method"
on Tue, 5 Jan 2010 11:26:41 +0900, Shugo Maeda shugo@ruby-lang.org writes:

|I prefer singleton_class than eigenclass. I suppose that "singleton
|class" is not so confusing with a class which implements the Singleton
|pattern because the word singleton remind Ruby users of singleton
|methods rather than the Singleton pattern.

Basically, I agree. But I cannot deny the fact that we already have
singleton.rb in the distribution, which provide Singleton class. I
confess I did. Probably I shouldn't have.

I've heard lots of people say that the similarity of names presents a
problem, but I've seen no evidence that there's actually a problem.
I've only very, very rarely heard anyone express confusion, and the
confusion only lasts for about two seconds until the difference is
explained:

Student: Is that related to the Singleton pattern?
Me:      No, "singleton" here has to do with object-specific
         behavior in Ruby's object model. It's a different
   concept that happens to have a similar-sounding name.
Student: Oh, OK.

And that's all there is to it (if even that much).

David

--
David A. Black
Senior Developer, Cyrus Innovation Inc.
THE COMPLEAT RUBYIST, Ruby training with Black/Brown/McAnally!
January 22-23, Tampa, Florida
Info and registration at http://www.thecompleatrubyist.com

=end

#23 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/1/5 Yukihiro Matsumoto matz@ruby-lang.org:

Basically, I agree.  But I cannot deny the fact that we already have
singleton.rb in the distribution, which provide Singleton class.  I
confess I did.  Probably I shouldn't have.

Today, I talked with Matz, and he has finally agreed with the use of
the term "singleton class." The reason why he has chosen the term
"singleton class" is that we have already had
Kernel#singleton_methods.

Then, the next issue is whether Kernel#singletonclass should create
an eigenclass when the receiver has no eigenclass. It would be better
to have an optional argument (singleton
class(true/false) or
singleton_class(:create => true)?) to switch the behavior.

Any thoughts?

--
Shugo Maeda

=end

#24 Updated by Kornelius Kalnbach about 4 years ago

=begin
On 23.02.10 08:14, Shugo Maeda wrote:

Today, I talked with Matz, and he has finally agreed with the use of
the term "singleton class." The reason why he has chosen the term
"singleton class" is that we have already had
Kernel#singleton_methods.
Yay! \o/

Then, the next issue is whether Kernel#singletonclass should create
an eigenclass when the receiver has no eigenclass. It would be better
to have an optional argument (singleton
class(true/false) or
singletonclass(:create => true)?) to switch the behavior.
I always perceived singleton classes to be transparently created in the
background. Would it be wise to give the programmer access to its
existence status? (I assume singleton
class(false) == nil would behave
like a singleton_class? method.) Today, Ruby has no way of telling
whether an object already has a singleton class, or am I wrong?

Also, why would I ask for a singleton_class without using it?

[murphy]

=end

#25 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/2/23 Kornelius Kalnbach murphy@rubychan.de:

Then, the next issue is whether Kernel#singletonclass should create
an eigenclass when the receiver has no eigenclass.  It would be better
to have an optional argument (singleton
class(true/false) or
singletonclass(:create => true)?) to switch the behavior.
I always perceived singleton classes to be transparently created in the
background. Would it be wise to give the programmer access to its
existence status? (I assume singleton
class(false) == nil would behave
like a singleton_class? method.) Today, Ruby has no way of telling
whether an object already has a singleton class, or am I wrong?

You are right, and it is why Matz wondered whether singletonclass
should create singleton classes. If it always creates singleton
classes, obj.singleton
class is just a short form of class << obj;
self; end. He said that it may be worth considering whether
singleton_class should provide an (optional) way to tell the existence
of a singleton class.

I think transparent creation of singleton classes is reasonable, but
it sometimes annoys me when I'm investigating the behavior of Ruby.
However, I don't come up with such a situation in a real-world
application.

--
Shugo Maeda

=end

#26 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/2/23 James Edward Gray II james@graysoftinc.com:

He said that it may be worth considering whether
singleton_class should provide an (optional) way to tell the existence
of a singleton class.

I think I would rather have another method for that, than a boolean flag:

Then, how about to introduce singletonclass as just a short form of
class <<obj; self; end at first?
We can add another method or an optional argument of singleton
class later.

 singleton_class?

x.singleton_class? sounds like "Is x a singleton class?", doesn't it?

--
Shugo Maeda

=end

#27 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/2/23 Shugo Maeda shugo@ruby-lang.org:

Then, how about to introduce singleton_class as just a short form of
class <<obj; self; end at first?

I have attached a patch with a test.

--
Shugo Maeda

Attachment: singleton_class.diff
=end

#28 Updated by Yehuda Katz about 4 years ago

=begin
I think the idea that some objects don't have a singleton class is an internal detail that is, as yet, not part of Ruby's semantics. I don't think we should add it to Ruby's semantics.
=end

#29 Updated by Yusuke Endoh about 4 years ago

=begin
Hi Shugo,

Then, how about to introduce singleton_class as just a short form of
class <<obj; self; end at first?

I have attached a patch with a test.

Any update here? Why don't you commit it?
Does Matz still hate "just a short form"?

--
Yusuke ENDOH mame@tsg.ne.jp
=end

#30 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/3/17 Yusuke Endoh redmine@ruby-lang.org:

Then, how about to introduce singleton_class as just a short form of
class <<obj; self; end at first?

I have attached a patch with a test.

Any update here?  Why don't you commit it?

I'm not sure whether it should be included in Ruby 1.9.2 or not.
What do you think of it, Yugui?

Does Matz still hate "just a short form"?

I don't think so.
Do you accept the patch, Matz?

--
Shugo Maeda

=end

#31 Updated by Yuki Sonoda about 4 years ago

=begin
On Thu, Mar 18, 2010 at 3:22 PM, Shugo Maeda shugo@ruby-lang.org wrote:

I'm not sure whether it should be included in Ruby 1.9.2 or not.
What do you think of it, Yugui?

You do not seem to have reached an agreement. We need more discussion.

-- Yuki Sonoda (Yugui)

=end

#32 Updated by Yusuke Endoh about 4 years ago

=begin
Hi,

2010/3/19 Yugui yugui@yugui.jp:

On Thu, Mar 18, 2010 at 3:22 PM, Shugo Maeda shugo@ruby-lang.org wrote:

I'm not sure whether it should be included in Ruby 1.9.2 or not.
What do you think of it, Yugui?

You do not seem to have reached an agreement. We need more discussion.

What should we discuss?

I think that there is no one who disagree with signleton_class
as "a short form of class << obj; self; end", except matz :-)

And, I thought matz was likely to accept "a short form" because
Shugo finally sent a patch for it.

--
Yusuke ENDOH mame@tsg.ne.jp

=end

#33 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/3/19 Yugui yugui@yugui.jp:

On Thu, Mar 18, 2010 at 3:22 PM, Shugo Maeda shugo@ruby-lang.org wrote:

I'm not sure whether it should be included in Ruby 1.9.2 or not.
What do you think of it, Yugui?

You do not seem to have reached an agreement. We need more discussion.

My proposal is to introduce Object#singleton_class as just a short
form of class <<obj; self; end.
Any objections?

It's OK for me to postpone it until Ruby 1.9.3 because users can
easily implement it on their on.
However, I think it's important to agree with the method name.

--
Shugo Maeda

=end

#34 Updated by Yuki Sonoda about 4 years ago

=begin
On Fri, Mar 19, 2010 at 7:20 PM, Yusuke ENDOH mame@tsg.ne.jp wrote:

I think that there is no one who disagree with signleton_class
as "a short form of class << obj; self; end", except matz :-)

And, I thought matz was likely to accept "a short form" because
Shugo finally sent a patch for it.  

I see. There is no problem to add it to Ruby 1.9.2 if there is an
agreement as the result of the discussion.

-- Yuki Sonoda (Yugui)

=end

#35 Updated by Yukihiro Matsumoto about 4 years ago

=begin
Hi,

In message "Re: Re: [Feature #1082] add Object#singleton_class method"
on Thu, 18 Mar 2010 15:22:23 +0900, Shugo Maeda shugo@ruby-lang.org writes:

|> Does Matz still hate "just a short form"?
|
|I don't think so.
|Do you accept the patch, Matz?

I accept.

                        matz.

=end

#36 Updated by Shugo Maeda about 4 years ago

=begin
Hi,

2010/3/22 Yukihiro Matsumoto matz@ruby-lang.org:

|> Does Matz still hate "just a short form"?
|
|I don't think so.
|Do you accept the patch, Matz?

I accept.

I have committed it to the SVN trunk. Thank you.

--
Shugo Maeda

=end

#37 Updated by Shugo Maeda about 4 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27022.
Suraj, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF