summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-26 09:42:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-26 09:42:28 +0000
commitb259db28fd7a1238a2939cee3ba6a3e60d8cf2cd (patch)
treec8c88c05a1a3853b0ed79ee1d65fd2783b82aaf2
parent030aec1c04191e78ee68395d4e449feed9feef07 (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--ChangeLog5
-rw-r--r--io.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 358eb30a57..d0d08d16b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/io.c b/io.c
index 56e87f0533..289354db07 100644
--- a/io.c
+++ b/io.c
@@ -6119,7 +6119,7 @@ Init_IO()
rb_define_singleton_method(argf, "lineno=", argf_set_lineno, 1);
rb_global_variable(&current_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);