diff options
author | Yukihiro Matsumoto <[email protected]> | 1994-12-19 12:01:10 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:31 +0900 |
commit | b3f9ba5a3720de81a9a14d9d906509f81abeef7a (patch) | |
tree | b5203ba2322aeb4ba05df7ddeb4d17369bd3e63a /io.c | |
parent | 00e36aa09f54925c2f9c30524b48f4f54a9adb23 (diff) |
version 0.62v0_62
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-0.62.tar.gz
Mon Dec 19 12:01:10 1994 Yukihiro Matsumoto (matz@ix-02)
* parse.y(cond): 条件式に代入式が置かれた場合,`-v'オプションで警
告が出るように.
* parse.y(**): 冪乗演算子`**'の優先順位を単項演算子より高くした.
* parse.y(and,or): 優先順位の低い演算子`and', `or'.
* 0.62 released.
* eval.c: 不必要になったPUSH_ENV, POP_ENVを減らした.
* env.h: ENVIONからselfをはずした.PUSH_ENVはsuperの準備のためだけ
に用いることにした.
* eval.c: 下記のオブジェクト化で遅くなった実行速度をもとに戻した.
Mon Dec 17 23:01:10 1994 Yukihiro Matsumoto (matz@ix-02)
* eval.c: env.{argv,argc}とscope.local_varsのオブジェクト化.
* eval.c: 1スコープ内で複数Blockを生成したときのバグを修正.
Fri Dec 16 15:52:06 1994 Yukihiro Matsumoto (matz@ix-02)
* parse.y: `&&'と`||'の両辺はいつでも条件式とした.
Thu Dec 15 00:16:04 1994 Yukihiro Matsumoto (matz@dyna)
* eval.c(Block): Blockオブジェクトを実現.
* node.h: NODE_QLISTはなくなった.
* eval.c(rb_call): 引数への代入を名前で一つずつ代入するのをやめて,
一度にコピーするようにした.
* eval.c(rb_call): rubyで記述されたメソッドへの引数渡しをinline化.
* eval.c: イテレータ判定処理の全面書き換え.不適切なイテレータ呼び
出しをなくした.例えば「[foo(),bar()]{i|baz(i)}」でfooもbarもイ
テレータとして呼び出され*ない*.
* eval.c(rb_call): SCOPE処理をinline化.メソッド呼び出しの若干の高
速化.
Wed Dec 14 18:09:33 1994 Yukihiro Matsumoto (matz@ix-02)
* node.h: nodeもオブジェクトにする.よってGCで回収される.
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -3,7 +3,7 @@ io.c - $Author: matz $ - $Date: 1994/12/06 09:30:03 $ + $Date: 1994/12/19 08:30:05 $ created at: Fri Oct 15 18:08:59 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -561,8 +561,8 @@ pipe_open(pname, mode) MakeOpenFile(port, fptr); fptr->mode = io_mode_flags(mode); - if ((fptr->mode & FMODE_READABLE) && pipe(pr) == -1 || - (fptr->mode & FMODE_WRITABLE) && pipe(pw) == -1) + if (((fptr->mode & FMODE_READABLE) && pipe(pr) == -1) || + ((fptr->mode & FMODE_WRITABLE) && pipe(pw) == -1)) rb_sys_fail(Qnil); doexec = (strcmp("-", pname) != 0); @@ -1313,15 +1313,15 @@ Init_IO() C_IO = rb_define_class("IO", C_Object); rb_include_module(C_IO, M_Enumerable); - rb_define_variable("$;", &FS, Qnil, rb_check_str); - rb_define_variable("$,", &OFS, Qnil, rb_check_str); + rb_define_variable("$;", &FS, Qnil, rb_check_str, 0); + rb_define_variable("$,", &OFS, Qnil, rb_check_str, 0); RS = str_new2("\n"); - rb_define_variable("$/", &RS, Qnil, rb_check_str); - rb_define_variable("$\\", &ORS, Qnil, rb_check_str); + rb_define_variable("$/", &RS, Qnil, rb_check_str, 0); + rb_define_variable("$\\", &ORS, Qnil, rb_check_str, 0); - rb_define_variable("$.", &lineno, Qnil, Qnil); - rb_define_variable("$_", &rb_lastline, Qnil, Qnil); + rb_define_variable("$.", &lineno, Qnil, Qnil, 0); + rb_define_variable("$_", &rb_lastline, Qnil, Qnil, 0); rb_define_method(C_IO, "each", Fio_each, 0); rb_define_method(C_IO, "each_byte", Fio_each_byte, 0); @@ -1355,17 +1355,17 @@ Init_IO() rb_define_method(C_IO, "ioctl", Fio_ioctl, 2); rb_stdin = prep_stdio(stdin, FMODE_READABLE); - rb_define_variable("$stdin", &rb_stdin, Qnil, rb_readonly_hook); + rb_define_variable("$stdin", &rb_stdin, Qnil, rb_readonly_hook, 0); rb_stdout = prep_stdio(stdout, FMODE_WRITABLE); - rb_define_variable("$stdout", &rb_stdout, Qnil, rb_readonly_hook); + rb_define_variable("$stdout", &rb_stdout, Qnil, rb_readonly_hook, 0); rb_stderr = prep_stdio(stderr, FMODE_WRITABLE); - rb_define_variable("$stderr", &rb_stderr, Qnil, rb_readonly_hook); + rb_define_variable("$stderr", &rb_stderr, Qnil, rb_readonly_hook, 0); rb_defout = rb_stdout; - rb_define_variable("$>", &rb_defout, Qnil, io_defset); + rb_define_variable("$>", &rb_defout, Qnil, io_defset, 0); argf = obj_alloc(C_Object); - rb_define_variable("$<", &argf, Qnil, rb_readonly_hook); - rb_define_variable("$ARGF", &argf, Qnil, rb_readonly_hook); + rb_define_variable("$<", &argf, Qnil, rb_readonly_hook, 0); + rb_define_variable("$ARGF", &argf, Qnil, rb_readonly_hook, 0); rb_define_single_method(argf, "each", Farg_each, 0); rb_define_single_method(argf, "each_byte", Farg_each_byte, 0); @@ -1383,7 +1383,7 @@ Init_IO() rb_include_module(CLASS_OF(argf), M_Enumerable); filename = str_new2("-"); - rb_define_variable("$FILENAME", &filename, Qnil, rb_readonly_hook); + rb_define_variable("$FILENAME", &filename, Qnil, rb_readonly_hook, 0); file = rb_stdin; rb_global_variable(&file); |