HomePhorge

`String#to_a` doesn't work in Ruby 1.9
e0ca0bc8bde3Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

String#to_a doesn't work in Ruby 1.9

In Ruby 1.8, counterintuitively, "foo".to_a would return ["foo"] - an
array with a single entry, the string. This went away in Ruby 1.9, likely
as a transition path to a much less confusing set of semantics.

Either way we should stop relying on that behaviour and get with the program.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU8023c169a221: Calling map on string now fails, rather than yielding the string.
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUe0ca0bc8bde3: `String#to_a` doesn't work in Ruby 1.9 (authored by Daniel Pittman <daniel@puppetlabs.com>).Mar 30 2012, 9:15 PM