Skip to content

Conversation

andrykonchin
Copy link
Member

Changes:

Object#singleton_method now returns methods in modules prepended to or included in the
receiver's singleton class. [Bug #20620]

o = Object.new
o.extend(Module.new{def a = 1})
o.singleton_method(:a).call #=> 1

…rom included/prepended in a singleton class modules
@andrykonchin andrykonchin merged commit 8287b05 into master Oct 4, 2025
24 checks passed
@andrykonchin andrykonchin deleted the ak/add-specs-for-kernel-singleton-method branch October 4, 2025 14:25
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

Successfully merging this pull request may close these issues.

1 participant