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

ArgumentError when using 2-argument for of IO#each #4459

Closed
rovf opened this issue Jan 25, 2017 · 2 comments
Closed

ArgumentError when using 2-argument for of IO#each #4459

rovf opened this issue Jan 25, 2017 · 2 comments

Comments

@rovf
Copy link

rovf commented Jan 25, 2017

jruby 1.7.26 (1.9.3p551) 2016-08-26 69763b8 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_79-b15 +jit [Windows 7-amd64]

f=File.open('some_file','r')
f.each(nil, 1024) {}

I get:

ArgumentError: wrong number of arguments (2 for 1)
from (irb):16:in evaluate' from org/jruby/RubyKernel.java:1079:in eval'
from org/jruby/RubyKernel.java:1479:in `loop'

The usage of f.each should be correct. From http://ruby-doc.org/core-1.9.3/IO.html#method-i-each :


each(sep,limit) {|line| block } → ios
Executes the block for every line in ios, where lines are separated by sep.

@aayush2610
Copy link

Hi, I am new to jruby and would like to contribute. Please let me know the details of this issue.

@kares
Copy link
Member

kares commented Jul 12, 2020

has been working since around the (~2017) JRuby 9.1 days

@kares kares closed this as completed Jul 12, 2020
@kares kares added this to the Invalid or Duplicate milestone Jul 12, 2020
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

4 participants