From: David Jacobs Date: 2011-03-06T16:09:50+09:00 Subject: Re: What does "ARGF.class" mean? --4d733338_725a06fb_262 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline From the source code, I see this: #define argf_of(obj) (*(struct argf *)DATA_PTR(obj)) #define ARGF argf_of(argf) # ... ... later on /* * Hack to get rdoc to regard ARGF as a class: * rb_cARGF = rb_define_class("ARGF", rb_cObject); */ rb_cARGF = rb_class_new(rb_cObject); rb_set_class_path(rb_cARGF, rb_cObject, "ARGF.class"); rb_define_alloc_func(rb_cARGF, argf_alloc); That's not a definitive answer, but it does look like the implementers are aware that some of ARGF's edges are hacks. On Sunday, 6 March 2011 at 1:56 am, Joey Zhou wrote: > ruby 1.9.2p180 (2011-02-18) [i386-mingw32] > > irb(main):001:0> ARGF.class > => ARGF.class > > What does "ARGF.class" mean? Isn't ARGF a special IO object, whose class > is "IO", just like STDIN? > > irb(main):002:0> STDIN.class > => IO > > -- > Posted via http://www.ruby-forum.com/. > --4d733338_725a06fb_262--