From: Yukihiro Matsumoto Date: 2007-04-26T17:08:50+09:00 Subject: Re: does Object#to_enum exist? Hi, In message "Re: does Object#to_enum exist?" on Thu, 26 Apr 2007 16:45:36 +0900, Dan Zwell writes: |I saw someone post a snippet of code that turned an object (with some |sort of "each" method) into an enumerable. It looked really neat, until |I tried: | | >> "abcdef".to_enum(:each_byte) |NoMethodError: undefined method `to_enum' for "abcdef":String | from (irb):1 | >> | |I looked it up and ri seems to think I have Object#to_enum. It's available only for 1.9. You can use it with Enumerator additional library installed. matz.