Fixing IO.binwrite specs, parsing options. #729

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@josedonizetti
Member

@headius @enebo @atambo Fixing binwrites specs. And as the hasOffset flag was removed and the mode calculation was done inline on the binwrite method I felt the necessity to parse mode in a string format to an int oflag. I've found a deprecated method that does this conversion, I know it is not the perfect world if you can give me feedback on other method that does the same thing.

EncodingUtils has a method that kind of does the same thing, but it depends on a file instance which I don't have.

(the deprecated method is ModeFlags. getOFlagsFromString)

Thoughts?

@atambo
Member
atambo commented May 11, 2013

In test/externals/ruby1.9/excludes/TestIO.rb there is an exclude for test_s_binwrite you should try removing that exclude and run ./bin/jruby test/externals/ruby1.9/ruby/test_io.rb -n test_s_binwrite to see if it passes now.

Also if you are looking for a non-deprecated method I think OpenFile.getFModeFromString(mode) would work for you.

@josedonizetti
Member

@atambo: great tips, thanks! learned some new things about tagged testing and way of running mri tests, till now I was only worrying about rubyspecs.

@josedonizetti josedonizetti referenced this pull request May 11, 2013
Closed

Fixing write specs #730

@josedonizetti
Member

@atambo has a code to fix this.

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