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

ARGF is missing lots of 1.9+ io-related methods #891

Closed
jrochkind opened this issue Jul 16, 2013 · 5 comments
Closed

ARGF is missing lots of 1.9+ io-related methods #891

jrochkind opened this issue Jul 16, 2013 · 5 comments

Comments

@jrochkind
Copy link

I am expanding this since I am just going to add many new methods which are missing from ARGF today: [:argv, :to_write_io, :lines, :readpartial, :read_nonblock, :getbyte, :readbyte, :write, :print, :putc, :puts, :printf, :inplace_mode, :inplace_mode=, :external_encoding, :internal_encoding, :set_encoding]. If I cannot do them all I will make sub-issues for these.

Original issue text:

core ARGF is supposed to have a #set_encoding method

It does in MRI 1.9.3.

It does not in jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_51-b11-457-11M4509 [darwin-x86_64]

$ ARGF.set_encoding("UTF-8")
NoMethodError: undefined method `set_encoding' for #<Object:0x307a140f>
@ghost ghost assigned enebo Jul 21, 2013
@enebo
Copy link
Member

enebo commented Jul 22, 2013

With recent commits the number of unimplemented methods are mostly just the writing related ones: [:argv, :to_write_io, :write, :print, :putc, :puts, :printf, :inplace_mode, :inplace_mode=]. The missing read ones and encoding ones are finished.

@bjhaid
Copy link

bjhaid commented Dec 12, 2013

Please when do we expect to have this methods available in jruby

@headius
Copy link
Member

headius commented Feb 26, 2014

@bjhaid You could help implement them :-)

@bjhaid
Copy link

bjhaid commented Feb 26, 2014

@headius sorry if my words came in the wrong way, I didn't mean to sound that bad, it's one of those days when I had knocked my head on the wall several times because of a feature that relied on ARGF, and my app worked fine with Cruby but then was dying on Jruby so, BTW I wish I could help but I barely know C

@kares
Copy link
Member

kares commented Jan 10, 2016

set_encoding and others is available in latest 1.7 + there's even more goodies in 9K these days :)

@kares kares closed this as completed Jan 10, 2016
@kares kares added this to the Invalid or Duplicate milestone Jan 10, 2016
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

5 participants