Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing IO.binwrite specs, parsing options. #729

Closed

Conversation

Projects
None yet
2 participants
@josedonizetti
Copy link
Member

josedonizetti commented May 11, 2013

@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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member Author

josedonizetti commented May 11, 2013

@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

This comment has been minimized.

Copy link
Member Author

josedonizetti commented May 11, 2013

@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
You can’t perform that action at this time.