You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
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.
The text was updated successfully, but these errors were encountered: