From 1cd93f1cdfbe6f7e71b05b3f8e707f21d70e94ba Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Sat, 11 May 2019 16:32:00 -0700 Subject: Allow DelegateClass() to module_eval given block Methods that return classes often module_eval the given block (e.g. Class.new and Struct.new). This allows DelegateClass to work similarly. This makes it easier to use DelegateClass directly without subclassing, so as not to create an unnecessary subclass. Implements [Feature #15842] --- NEWS | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 89ed64ce4b..9aa94cd4e9 100644 --- a/NEWS +++ b/NEWS @@ -118,6 +118,11 @@ Date:: new Japanese era as an informal extension, until the new JIS X 0301 is issued. [Feature #15742] +Delegate:: + + * Object#DelegateClass accepts a block and module_evals it in the context + of the returned class, similar to Class.new and Struct.new. + ERB:: * Prohibit marshaling ERB instance. -- cgit v1.2.3