Forum: Ruby-core [ruby-trunk - Bug #7675][Assigned] main.protected is not defined

C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 shugo (Shugo Maeda) (Guest)
on 2013-01-09 00:08
(Received via mailing list)
Issue #7675 has been reported by shugo (Shugo Maeda).

----------------------------------------
Bug #7675: main.protected is not defined
https://bugs.ruby-lang.org/issues/7675

Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-01-07 trunk 38731) [i686-linux]


main (self at toplevel) has public and private, but doesn't have
protected.

  public
  private
  protected #=> NoMethodError

It looks a bit weird.

I guess it was forgotten to add main.protected when Module#protected was
introduced
in Ruby 1.1b9_05.
main.protected seems not to be useful because it makes methods of Object
protected, but
it might be good to have main.protected for consistency.
02da662c083396641da96c1d32fc86ed?d=identicon&s=25 KOSAKI Motohiro (Guest)
on 2013-01-09 00:55
(Received via mailing list)
> Target version: 2.0.0

2.0?
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 shugo (Shugo Maeda) (Guest)
on 2013-01-09 02:31
(Received via mailing list)
Issue #7675 has been updated by shugo (Shugo Maeda).


kosaki (Motohiro KOSAKI) wrote:
> > Target version: 2.0.0
>
>  2.0?

I considered it a bug, but if Matz consider it a new feature, feel free
to move it to next minor or to reject it simply.

----------------------------------------
Bug #7675: main.protected is not defined
https://bugs.ruby-lang.org/issues/7675#change-35294

Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-01-07 trunk 38731) [i686-linux]


main (self at toplevel) has public and private, but doesn't have
protected.

  public
  private
  protected #=> NoMethodError

It looks a bit weird.

I guess it was forgotten to add main.protected when Module#protected was
introduced
in Ruby 1.1b9_05.
main.protected seems not to be useful because it makes methods of Object
protected, but
it might be good to have main.protected for consistency.
0ec4920185b657a03edf01fff96b4e9b?d=identicon&s=25 matz (Yukihiro Matsumoto) (Guest)
on 2013-01-09 02:39
(Received via mailing list)
Issue #7675 has been updated by matz (Yukihiro Matsumoto).


I am not positive to add it.
There's no reason to add protected except for consistency, since it
behaves just like public.

Matz.


----------------------------------------
Bug #7675: main.protected is not defined
https://bugs.ruby-lang.org/issues/7675#change-35295

Author: shugo (Shugo Maeda)
Status: Assigned
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-01-07 trunk 38731) [i686-linux]


main (self at toplevel) has public and private, but doesn't have
protected.

  public
  private
  protected #=> NoMethodError

It looks a bit weird.

I guess it was forgotten to add main.protected when Module#protected was
introduced
in Ruby 1.1b9_05.
main.protected seems not to be useful because it makes methods of Object
protected, but
it might be good to have main.protected for consistency.
C4e88907313843cf07f6d85ba8162120?d=identicon&s=25 shugo (Shugo Maeda) (Guest)
on 2013-01-09 02:43
(Received via mailing list)
Issue #7675 has been updated by shugo (Shugo Maeda).

Status changed from Assigned to Rejected

matz (Yukihiro Matsumoto) wrote:
> I am not positive to add it.
> There's no reason to add protected except for consistency, since it behaves just
like public.

OK, so I close this ticket.

----------------------------------------
Bug #7675: main.protected is not defined
https://bugs.ruby-lang.org/issues/7675#change-35296

Author: shugo (Shugo Maeda)
Status: Rejected
Priority: Normal
Assignee: matz (Yukihiro Matsumoto)
Category: core
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2013-01-07 trunk 38731) [i686-linux]


main (self at toplevel) has public and private, but doesn't have
protected.

  public
  private
  protected #=> NoMethodError

It looks a bit weird.

I guess it was forgotten to add main.protected when Module#protected was
introduced
in Ruby 1.1b9_05.
main.protected seems not to be useful because it makes methods of Object
protected, but
it might be good to have main.protected for consistency.
This topic is locked and can not be replied to.