class A
def self.x
a = A.new
a.y
end
private
def y
end
end
A.x
=>
`x': private method `y' called for #<A:0x007fe5c0922fb8> (NoMethodError)
from 13:in `<main>'
なんで……?
Go to list of users who liked
More than 5 years have passed since last update.
class A
def self.x
a = A.new
a.y
end
private
def y
end
end
A.x
=>
`x': private method `y' called for #<A:0x007fe5c0922fb8> (NoMethodError)
from 13:in `<main>'
なんで……?
Register as a new user and use Qiita more conveniently
Go to list of users who liked