From: Yusuke ENDOH Date: 2010-09-02T00:26:35+09:00 Subject: [ruby-core:31998] Re: [Ruby 1.9-Feature#3714][Feedback] Add getters for Enumerator Hi, knu 2010/8/29 Akinori MUSHA : > So, it was intentional for me as the original API designer not to have provided those accessor methods. ?For a generator of an Enumerator object, the ingredients are known without a need for such methods. ?For a consumer, it should only matter that it is an Enumerable object. It is reasonable (for me), but sometimes too strict. For example, when I want to define my custom Enumerator#inspect, I must parse the result of original inspect. It is cumbersome. In general, Ruby does not stop us to shoot our foot. How about providing methods that Marc-Andre suggested, as private methods? > Actually, Enumerator#inspect originally did not show anything internal but I changed it to show some just to help debugging. ?So if the symmetry really matters and you insist on it I'd rather change it back. Nooo! The current Enumerator#inspect is really helpful. Do not revert it ;-( -- Yusuke Endoh