Skip to content

Loading…

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

Closed
damphyr opened this Issue · 2 comments

3 participants

@damphyr

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 tomykaira added a commit to tomykaira/hoe that referenced this issue
@tomykaira tomykaira Workaround for rubinius/rubinius#1766 5cf8bcc
@dbussink
Rubinius member

Fixed in 5be1b2e

@dbussink dbussink closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.