diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-19 06:22:55 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-03-19 06:22:55 +0000 |
commit | e9bd2d2284dafed7b1faec6628690022178e7e18 (patch) | |
tree | 1979cd82f852e632c81f042296de314576b23bc5 | |
parent | ae08a031a6560fee564a113f4ba7799430f887f7 (diff) |
DATA
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | parse.y | 2 | ||||
-rw-r--r-- | ruby.c | 7 |
3 files changed, 9 insertions, 3 deletions
@@ -1,5 +1,8 @@ Wed Mar 18 17:46:31 1998 Yukihiro Matsumoto <matz@netlab.co.jp> + * ruby.c (load_file): new file object constant DATA. Only + available for the script from the file. + * regex.c (re_match): forwading failure point popped too much. Tue Mar 17 18:23:06 1998 Yukihiro Matsumoto <matz@netlab.co.jp> @@ -3939,8 +3939,6 @@ static st_table *rb_symbol_tbl; void Init_sym() { - int strcmp(); - sym_tbl = st_init_strtable(); rb_global_variable((VALUE*)&cur_cref); rb_global_variable((VALUE*)&lex_lastline); @@ -537,7 +537,12 @@ load_file(fname, script) RS = rs; } compile_file(fname, f, line_start); - if (f != rb_stdin) io_close(f); + if (script) { + rb_define_global_const("DATA", f); + } + else if (f != rb_stdin) { + io_close(f); + } } void |