Project

General

Profile

Actions

Feature #20712

closed

module should return newly defined module

Added by esad (Esad Hajdarevic) 3 months ago. Updated 3 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:119023]

Description

Currently module keyword returns nil after defining a new module:

x = module Foo
end
# x is nil

It would be more consistent with Module.new if module keyword returned the newly defined module. Then we could do:

using(module Foo
  refine ...
end)

instead of

module Foo
end
using Foo
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0