Issue #8614 has been reported by sawa (Tsuyoshi Sawada).

----------------------------------------
Feature #8614: Object#singleton_class with a block
https://bugs.ruby-lang.org/issues/8614

Author: sawa (Tsuyoshi Sawada)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
Most of the time when I use `Object#singleton_class`, I use it with `class_eval` following it, like follows:

    class Foo
      singleton_class.class_eval{attr_accessor :bar}
    end

I think it would be convenient if `Object#singleton_class` can optionally take a block so that the following will mean the same as above.

    class Foo
      singleton_class{attr_accessor :bar}
    end

=end



-- 
http://bugs.ruby-lang.org/