Project

General

Profile

Actions

Bug #18753

closed

lineno= is not returning an integer

Added by buzztaiki (Taiki Sugawara) almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:108390]

Description

The call-seq for argf_set_lineno says it returns an integer, but in fact it returns nil.

https://github.com/ruby/ruby/blob/84f410e5e64a2480a86de7c50f01f01f71816435/io.c#L9330

p ARGF.send(:lineno=, 1)
nil

For IO, the input integer value is returned as documented.

p File.open(__FILE__).send(:lineno=, 1)
1

I think ARGF should also return the input value.
I think it is so trivial, but I'm having a little trouble with (adding ARGF to rbs)[https://github.com/ruby/rbs/pull/975].

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0