Project

General

Profile

Misc #9136

Updated by nobu (Nobuyoshi Nakada) about 11 years ago

=begin 
 Documentation it says: 

  In 

 ((*In the second, deprecated, form, a generated Enumerator iterates over the given object using the given method with the given arguments passed. 

  

 Use of this form is discouraged. Use Kernel#enum_for or Kernel#to_enum instead. 

       
 *)) 

 (({      e = Enumerator.new(ObjectSpace, :each_object) 
       #-> ObjectSpace.enum_for(:each_object) 


 
 })) 

 But (({#enum_for})) #enum_for and (({#to_enum})) #to_enum are not available to subclasses of (({BasicObject})). BasicObject. In fact, I was defining (({#to_enum})) #to_enum for a class that is a subclass of (({BasicObject})), BasicObject, and now I get warning of deprecation. 
 =end 

Back