Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2.1.2p95 > require 'csv'
=> true
2.1.2p95 > headers = %w{foo bar}
=> ["foo", "bar"]
2.1.2p95 > row = CSV::Row.new(headers, [10, 20])
=> #<CSV::Row "foo":10 "bar":20>
2.1.2p95 > headers.map(&:frozen?)
=> [true, true]
2.1.2p95 > headers.first.upcase!
RuntimeError: can't modify frozen String
from (pry):5:in `upcase!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.