diff options
author | Stan Lo <stan001212@gmail.com> | 2023-01-12 11:49:12 +0000 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-01-12 11:49:16 +0000 |
commit | 207f8d0027d679780d4f3962c305d36885feb652 (patch) | |
tree | a54ee6eaeb2f185d6780a8d526a2dfc1856f898d /string.c | |
parent | 3faecaaa60f9639081f1c4ec26e279cc118cbbea (diff) | |
download | ruby-207f8d0027d679780d4f3962c305d36885feb652.tar.gz |
[ruby/irb] Avoid calling private methods on the main object
(https://github.com/ruby/irb/pull/498)
When the main object is frozen, `IRB` wraps a `SimpleDelegator` around it.
But because `SimpleDelegator` doesn't delegate private methods, methods like
`require_relative` or `const_get` would cause error, which are needed for
lazily loading commands.
This commit works around this limitation by avoiding those private method calls
when setting up command execution.
Diffstat (limited to 'string.c')
0 files changed, 0 insertions, 0 deletions