エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Feature #13129: Refinements cannot refine method_missing and respond_to_missing? - Ruby - Ruby Issue Tracking System
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Feature #13129: Refinements cannot refine method_missing and respond_to_missing? - Ruby - Ruby Issue Tracking System
Refinements with method_missing and respond_to_missing? behaves very strangely. class C; end usin... Refinements with method_missing and respond_to_missing? behaves very strangely. class C; end using Module.new { refine C do def x() p:x; end def method_missing(m, *args) m == :foo ? p(:fooo!) : super end def respond_to_missing?(m, include_private = false) (m == :foo) || super end end } C.new.x p C.new.respond_to? :foo C.new.foo The script above doesn't respond_to :foo nor run :foo as expected. Act

