-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
JRuby doesn't support DATA and __END__ #3579
Comments
Oops. I guess test coverage is a little weak here. |
No you've just got the tests tagged! |
I added some stuff to your lexer to get it working in Truffle in 46bdc3c so that may be useful for you. |
@chrisseaton Thanks, that probably works for most uses of DATA. It doesn't work for stdin though.
|
Gah didn't think of that. |
I should have a fix shortly that will enable both runtimes to do it mostly right. |
@chrisseaton @enebo I pushed my fix, which mostly involved getting access to the real FileChannel for the read file, putting it in a RubyFile, and grabbing that on the other side for DATA. This is now fully compatible with MRI's DATA since it's a real File with the actual descriptor/channel used to parse. Not that anyone is ever going to care. @enebo The previous commit removes buffering from RubyInstanceConfig.getScriptSource. I could not think of a path in our code where the resulting stream wouldn't be buffered already or get buffered by RubyIO anyway. @chrisseaton I also added |
@headius yeah script source is fine the others I might worry about |
The other source forms for require etc won't ever need DATA so it isn't as
big a deal. If they're double-buffering, though, that's overhead we don't
need.
|
@headius last time I checked they were not but that was also because all buffering had been removed so I added buffering back into the mix :) |
We need a spec for this STDIN case 😄 |
Looks like it was removed during development for 9.
The text was updated successfully, but these errors were encountered: