Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
JRuby doesn't support DATA and __END__ #3579
@chrisseaton Thanks, that probably works for most uses of DATA. It doesn't work for stdin though.
@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