IO.new encoding "fallback" syntax for mode broken in 1.9 #1766

Closed
damphyr opened this Issue Jun 3, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@damphyr

damphyr commented Jun 3, 2012

When opening files in 1.9.x the following mode specification is valid: "r:bom|utf-8"

This seems to be a fallback syntax "if you can't open it in bom mode try utf-8".

I found the entry for the same bug for jruby http://jira.codehaus.org/browse/JRUBY-6320 but not the documented source yet.

The following code reproduces the problem

path="something.txt"

open path, "r:bom|utf-8" do |f|
  f.read
end

tomykaira added a commit to tomykaira/hoe that referenced this issue Jul 11, 2012

@dbussink

This comment has been minimized.

Show comment
Hide comment
@dbussink

dbussink Jul 25, 2012

Member

Fixed in 5be1b2e

Member

dbussink commented Jul 25, 2012

Fixed in 5be1b2e

@dbussink dbussink closed this Jul 25, 2012

@headius

This comment has been minimized.

Show comment
Hide comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment