Project

General

Profile

Actions

Bug #7675

closed

main.protected is not defined

Added by shugo (Shugo Maeda) almost 12 years ago. Updated almost 12 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 2.0.0dev (2013-01-07 trunk 38731) [i686-linux]
Backport:
[ruby-core:51322]

Description

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.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0