From: "trans (Thomas Sawyer)" Date: 2013-03-07T17:01:55+09:00 Subject: [ruby-core:53187] [ruby-trunk - Feature #8038] Keyword `object` to be used instead of `class <<` Issue #8038 has been updated by trans (Thomas Sawyer). @alexey I sympathize. I tend to avoid `class << foo` too b/c it "reads" so poorly. @david Facets extends #extend to do that actually, but it does not add the the methods directly. Instead it creates an anonymous module which it includes into the singleton class. In this way it behaves the same as extending with a module. ---------------------------------------- Feature #8038: Keyword `object` to be used instead of `class <<` https://bugs.ruby-lang.org/issues/8038#change-37354 Author: alexeymuranov (Alexey Muranov) Status: Rejected Priority: Normal Assignee: Category: core Target version: Next Major =begin I propose to introduce a new keyword (({object})) and to use it instead of the mysterious (({class <<})): object foo def bar # ... end def baz # ... end end instead of foo = Object.new class << foo def bar # ... end def baz # ... end end =end -- http://bugs.ruby-lang.org/