From: merch-redmine@... Date: 2019-08-31T17:16:38+00:00 Subject: [ruby-core:94701] [Ruby master Bug#16127] Delegates to BasicObject do not work Issue #16127 has been updated by jeremyevans0 (Jeremy Evans). Sure, it would be fine to use `#bind_call` for this. At the time this patch was submitted, `#bind_call` wasn't available. I know I have a patch in #7833 where `#bind_call` could also be applied. We should probably do a sweep for other places in stdlib where `#bind_call` could be used. ---------------------------------------- Bug #16127: Delegates to BasicObject do not work https://bugs.ruby-lang.org/issues/16127#change-81310 * Author: jeremyevans0 (Jeremy Evans) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-08-25) [x86_64-openbsd6.5] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- The delegate library does not currently handle BasicObject targets, since it assumes the target responds to `respond_to?`. The attached patch works around the issue by binding the Kernel `respond_to?` instance method to the target and then calling that. ---Files-------------------------------- delegate-basicobject.patch (2.29 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: