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

Object#respond_to_missing? の「false を返します」について #2914

Open
tmtm opened this issue Oct 21, 2024 · 3 comments
Open

Object#respond_to_missing? の「false を返します」について #2914

tmtm opened this issue Oct 21, 2024 · 3 comments

Comments

@tmtm
Copy link
Contributor

tmtm commented Oct 21, 2024

https://docs.ruby-lang.org/ja/latest/method/Object/i/respond_to_missing=3f.html

false を返します。

という一文が唐突に存在してるんですが、これは何を言いたいんでしょうか?

@znz
Copy link
Member

znz commented Oct 21, 2024

override されていない Object#respond_to_missing? (実際は Kernel#respond_to_missing?) の実装は無条件に false を返すだけ、という意味だと思います。

@tmtm
Copy link
Contributor Author

tmtm commented Oct 21, 2024

おー、なるほど! ちょっとわかりにくいっすね…。

@znz
Copy link
Member

znz commented Oct 21, 2024

確かに唐突でわかりにくい気がするので、改善案があれば pull request をよろしくお願いします。

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

2 participants