Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: JRuby 1.6.2
-
Fix Version/s: JRuby 1.6.3
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:OS X 10.6.7
-
Number of attachments :
Description
The following code works in MRI Ruby 1.8.7 and Ruby 1.9.2:
File.open('some.file', 'r')
{|f| puts f.readbyte }But fails with JRuby with the following error:
NoMethodError: undefined method `readbyte' for #<File:filename (closed)>
This method is similar to the getbyte() method (which does work in JRuby), but it has different behavior at EOF. See http://www.ruby-doc.org/core/classes/IO.html#M000925
Added RubySpecs:
commit 467655887b84b1a5f15b501d4c365efc017c0408 Author: Charles Oliver Nutter <headius@headius.com> Date: Thu Jun 23 20:08:56 2011 -0500 Add a couple basic IO#readbyte specs (1.9)jruby-1_6:
commit c9444d41a392e89c269ec6e6b1b4837d8a3aa434 Author: Charles Oliver Nutter <headius@headius.com> Date: Thu Jun 23 20:09:57 2011 -0500 Fix JRUBY-5888: missing File#readbyte * Add IO#readbyte.master: ac992dfaa803bc18c7dae0d02c14055b1888b281