ruby-changes:12574
From: nobu <ko1@a...>
Date: Sun, 26 Jul 2009 18:42:46 +0900 (JST)
Subject: [ruby-changes:12574] Ruby:r24283 (ruby_1_8): * io.c (Init_IO): $FILENAME should correspond to the first element
nobu 2009-07-26 18:42:28 +0900 (Sun, 26 Jul 2009) New Revision: 24283 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24283 Log: * io.c (Init_IO): $FILENAME should correspond to the first element of ARGV initially. Modified files: branches/ruby_1_8/ChangeLog branches/ruby_1_8/io.c Index: ruby_1_8/ChangeLog =================================================================== --- ruby_1_8/ChangeLog (revision 24282) +++ ruby_1_8/ChangeLog (revision 24283) @@ -1,3 +1,8 @@ +Sun Jul 26 18:42:23 2009 Nobuyoshi Nakada <nobu@r...> + + * io.c (Init_IO): $FILENAME should correspond to the first elemen + of ARGV initially. + Fri Jul 24 20:33:49 2009 Akinori MUSHA <knu@i...> * lib/time.rb, test/test_time.rb: Move test code to a separate Index: ruby_1_8/io.c =================================================================== --- ruby_1_8/io.c (revision 24282) +++ ruby_1_8/io.c (revision 24283) @@ -6119,7 +6119,7 @@ rb_define_singleton_method(argf, "lineno=", argf_set_lineno, 1); rb_global_variable(¤t_file); - rb_define_readonly_variable("$FILENAME", &filename); + rb_define_virtual_variable("$FILENAME", argf_filename, 0); filename = rb_str_new2("-"); rb_define_virtual_variable("$-i", opt_i_get, opt_i_set); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/