diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 09:42:28 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-26 09:42:28 +0000 |
| commit | b259db28fd7a1238a2939cee3ba6a3e60d8cf2cd (patch) | |
| tree | c8c88c05a1a3853b0ed79ee1d65fd2783b82aaf2 | |
| parent | 030aec1c04191e78ee68395d4e449feed9feef07 (diff) | |
* io.c (Init_IO): $FILENAME should correspond to the first element
of ARGV initially.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@24283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | io.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun Jul 26 18:42:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * io.c (Init_IO): $FILENAME should correspond to the first elemen + of ARGV initially. + Fri Jul 24 20:33:49 2009 Akinori MUSHA <knu@iDaemons.org> * lib/time.rb, test/test_time.rb: Move test code to a separate @@ -6119,7 +6119,7 @@ Init_IO() 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); |
