Issue #22189 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: REQUIRED to 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ruby_4_0 commit:ca6c51ccc21cf9690eb4c11e0bfb97e3643c19db merged revision(s) commit:aaf54aa08b0ed73ae21786b5341f1ffc51659911. ---------------------------------------- Bug #22189: `Enumerator::Lazy#to_enum` does not accept method names as strings https://bugs.ruby-lang.org/issues/22189#change-118082 * Author: nobu (Nobuyoshi Nakada) * Status: Closed * Backport: 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONE ---------------------------------------- `Kernel#to_enum` accepts a `String` as well as a `Symbol`. ```ruby [1,2,3].to_enum(:map).to_a #=> [1, 2, 3] [1,2,3].to_enum("map").to_a #=> [1, 2, 3] [1,2,3].lazy.to_enum(:map).to_a #=> [1, 2, 3] [1,2,3].lazy.to_enum("map").to_a #=> [] ``` Related to [Bug #7877]. -- https://bugs.ruby-lang.org/