Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to create private methods? #1357

Closed
dmajkic opened this issue Jul 9, 2013 · 3 comments
Closed

Is there a way to create private methods? #1357

dmajkic opened this issue Jul 9, 2013 · 3 comments

Comments

@dmajkic
Copy link
Contributor

dmajkic commented Jul 9, 2013

Keyword private Is not in Kernel, but there is a list of privates.

If there is no way to declare private methods, could the private keyword at least be supported as no-op?

@matz
Copy link
Member

matz commented Jul 10, 2013

There's no way to declare methods as private. It's the limitation of mruby.
But providing op-op private might be a good idea.

@fregas
Copy link

fregas commented Oct 4, 2020

This bit me. I expected my private methods to be enforced by the interpreter, but one was still being called after I moved it to private. I would just +1 for real private/protected methods since the keywords are there.

@matz
Copy link
Member

matz commented Oct 6, 2020

We have PR #4498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants