Project

General

Profile

Feature #6287

nested method should only be visible by nesting/enclosing method

Added by botp (bot pena) over 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:44329]

Description

def test1
def test2
p "i am test2"
end
test2
end

test1
"i am test2" # ok

test2

"i am test2" # not ok (imho), this should fail; ie test2 should only be visible by test1, not by outside.


Related issues

Is duplicate of Ruby master - Feature #4085: Refinements and nested methodsClosedshugo (Shugo Maeda)11/24/2010Actions

Also available in: Atom PDF