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

The -0 option or any other initialization of InstanceConfig.getDefaultSeparator breaks gets #3026

Open
enebo opened this issue Jun 9, 2015 · 0 comments

Comments

@enebo
Copy link
Member

enebo commented Jun 9, 2015

I hacked around the real bug in b96813f since we were close to a release but the real problem is that -0 will change instanceconfig.defaultSeparator and https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyIO.java#L706 is checking against that changed value. Since it passes the test if goes fast path which assumes a delimeter of \n.

For singlebyte values perhaps we can still go fast path but I think we should be conservative and fix this to test if it is the original default value for recordseparator and go with that (otherwise we will be doing a length check per gets.

@enebo enebo added the core label Jun 9, 2015
@enebo enebo added this to the JRuby 9.0.0.0 milestone Jun 9, 2015
@enebo enebo modified the milestone: JRuby 9.0.0.0 Jul 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant