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

Posted by 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.
Posted by KOSAKI Motohiro (Guest)
on 2013-01-09 00:55
(Received via mailing list)
> Target version: 2.0.0

2.0?
Posted by 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.
Posted by 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.
Posted by 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.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.