Project

General

Profile

Actions

Feature #8046

open

allow Object#extend to take a block

Added by phluid61 (Matthew Kerwin) about 11 years ago. Updated over 6 years ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:53211]

Description

=begin
In #8038 david_macmahon proposed:

How about allowing Object#extend to take a block that would be executed with the context such that methods defined therein would become singleton methods of the object receiving #extend?

For example:
foo = Object.new
foo.extend do
def bar
# ...
end
def baz
# ...
end
end
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0