Bug #5070

CSV.generate should not modify the given option hash

Added by Marc-Andre Lafortune almost 3 years ago. Updated almost 3 years ago.

[ruby-core:38356]
Status:Closed
Priority:Normal
Assignee:James Gray
Category:lib
Target version:1.9.3
ruby -v:r32598 Backport:

Description

Currently:

CSV.generate( {}.freeze ) # => RuntimeError: can't modify frozen Hash

I'm not sure where these tests would ideally go; In the attached patch, I've put them at the end of csv/test_interface

If you can, please make the modifications you see fit, or else I'll commit this in a of week or two.

(From http://stackoverflow.com/questions/6759487/ruby-hash-object-changed-by-csv-library )

csv.patch Magnifier (1.53 KB) Marc-Andre Lafortune, 07/22/2011 04:23 AM

History

#1 Updated by Anonymous almost 3 years ago

On Thu, Jul 21, 2011 at 2:23 PM, Marc-Andre Lafortune
ruby-core@marc-andre.ca wrote:

Issue #5070 has been reported by Marc-Andre Lafortune.


Bug #5070: CSV.generate should not modify the given option hash
http://redmine.ruby-lang.org/issues/5070

Author: Marc-Andre Lafortune
Status: Assigned
Priority: Normal
Assignee: James Gray
Category: lib
Target version: 1.9.3
ruby -v: r32598

Currently:

   CSV.generate( {}.freeze ) # => RuntimeError: can't modify frozen Hash

I'm not sure where these tests would ideally go; In the attached patch, I've put them at the end of csv/test_interface

If you can, please make the modifications you see fit, or else I'll commit this in a of week or two.

(From http://stackoverflow.com/questions/6759487/ruby-hash-object-changed-by-csv-library )

Feel free to commit.

James Edward Gray II

#2 Updated by Marc-Andre Lafortune almost 3 years ago

  • Status changed from Assigned to Closed

Feel free to commit.

James Edward Gray II

Done, thanks (r32600 & 32602)

Also available in: Atom PDF