From: "ioquatix (Samuel Williams) via ruby-core" Date: 2023-02-25T03:08:44+00:00 Subject: [ruby-core:112589] [Ruby master Feature#19466] Class.new takes a block, why doesn't Module.new take a block? Issue #19466 has been updated by ioquatix (Samuel Williams). Ahh, so why does `EnvUtil` not use this? Maybe it's legacy? ---------------------------------------- Feature #19466: Class.new takes a block, why doesn't Module.new take a block? https://bugs.ruby-lang.org/issues/19466#change-102037 * Author: ioquatix (Samuel Williams) * Status: Open * Priority: Normal ---------------------------------------- ```ruby Class.new do #... equivalent to class_eval end ``` So, why don't we introduce: ```ruby Module.new do #... equivalent to class_eval end ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/