Skip to content

Fixing IO.binwrite specs, parsing options.#729

Closed
josedonizetti wants to merge 1 commit intojruby:masterfrom
josedonizetti:fixing_binwrite_specs
Closed

Fixing IO.binwrite specs, parsing options.#729
josedonizetti wants to merge 1 commit intojruby:masterfrom
josedonizetti:fixing_binwrite_specs

Conversation

@josedonizetti
Copy link
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
Copy link
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
Copy link
Member Author

@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 mentioned this pull request May 11, 2013
@josedonizetti
Copy link
Member Author

@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants