diff options
-rw-r--r-- | CVS/Entries | 51 | ||||
-rw-r--r-- | CVS/Repository | 1 | ||||
-rw-r--r-- | ChangeLog | 1147 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile.in | 175 | ||||
-rw-r--r-- | ToDo | 5 | ||||
-rw-r--r-- | array.c | 77 | ||||
-rw-r--r-- | bignum.c | 38 | ||||
-rw-r--r-- | bring | 57 | ||||
-rwxr-xr-x | config.status | 72 | ||||
-rw-r--r-- | configure.in | 34 | ||||
-rw-r--r-- | dbm.c | 14 | ||||
-rw-r--r-- | defines.h | 2 | ||||
-rw-r--r-- | dict.c | 27 | ||||
-rw-r--r-- | dir.c | 32 | ||||
-rw-r--r-- | dln.c | 1 | ||||
-rw-r--r-- | enum.c | 12 | ||||
-rw-r--r-- | etc.c | 4 | ||||
-rw-r--r-- | eval.c | 21 | ||||
-rw-r--r-- | file.c | 101 | ||||
-rw-r--r-- | fnmatch.c | 1 | ||||
-rw-r--r-- | gc.c | 30 | ||||
-rw-r--r-- | getopt.c (renamed from missing/getopt.c) | 2 | ||||
-rw-r--r-- | getopt.h (renamed from missing/getopt.h) | 0 | ||||
-rw-r--r-- | getopt1.c (renamed from missing/getopt1.c) | 4 | ||||
-rw-r--r-- | gnuglob.c | 2 | ||||
-rw-r--r-- | io.c | 69 | ||||
-rw-r--r-- | missing.c | 67 | ||||
-rw-r--r-- | missing/CVS/Entries | 9 | ||||
-rw-r--r-- | missing/CVS/Repository | 1 | ||||
-rw-r--r-- | missing/alloca.c | 189 | ||||
-rw-r--r-- | missing/strdup.c | 25 | ||||
-rw-r--r-- | missing/strftime.c | 6 | ||||
-rwxr-xr-x | newver.rb | 19 | ||||
-rw-r--r-- | numeric.c | 10 | ||||
-rw-r--r-- | object.c | 4 | ||||
-rw-r--r-- | pack.c | 42 | ||||
-rw-r--r-- | parse.y | 18 | ||||
-rw-r--r-- | process.c | 81 | ||||
-rw-r--r-- | range.c | 14 | ||||
-rw-r--r-- | re.c | 56 | ||||
-rw-r--r-- | regex.c | 1 | ||||
-rw-r--r-- | ruby.c | 12 | ||||
-rw-r--r-- | ruby.h | 35 | ||||
-rw-r--r-- | sample/Artistic | 117 | ||||
-rw-r--r-- | sample/aset.rb | 6 | ||||
-rw-r--r-- | sample/attr.rb | 11 | ||||
-rw-r--r-- | sample/biorhythm.rb | 201 | ||||
-rw-r--r-- | sample/case.rb | 12 | ||||
-rw-r--r-- | sample/cat.rb | 1 | ||||
-rw-r--r-- | sample/cat2.rb | 1 | ||||
-rw-r--r-- | sample/cbreak.rb | 2 | ||||
-rw-r--r-- | sample/clnt.rb | 2 | ||||
-rw-r--r-- | sample/clone.rb | 6 | ||||
-rw-r--r-- | sample/const.rb | 4 | ||||
-rw-r--r-- | sample/dbm.rb | 8 | ||||
-rw-r--r-- | sample/dir.rb | 7 | ||||
-rw-r--r-- | sample/evaldef.rb | 5 | ||||
-rw-r--r-- | sample/export.rb | 5 | ||||
-rw-r--r-- | sample/fib.rb | 2 | ||||
-rw-r--r-- | sample/freq.rb | 4 | ||||
-rw-r--r-- | sample/gctest.rb | 1 | ||||
-rw-r--r-- | sample/hash.rb | 7 | ||||
-rw-r--r-- | sample/io.rb | 3 | ||||
-rwxr-xr-x | sample/less.rb | 15 | ||||
-rw-r--r-- | sample/list.rb | 42 | ||||
-rw-r--r-- | sample/list2.rb | 2 | ||||
-rw-r--r-- | sample/list3.rb | 4 | ||||
-rw-r--r-- | sample/math.rb | 2 | ||||
-rwxr-xr-x | sample/mpart.rb | 2 | ||||
-rw-r--r-- | sample/newver.rb | 13 | ||||
-rw-r--r-- | sample/occur.rb | 2 | ||||
-rw-r--r-- | sample/occur2.rb | 2 | ||||
-rw-r--r-- | sample/opt_s.rb | 4 | ||||
-rw-r--r-- | sample/opt_x.rb | 6 | ||||
-rw-r--r-- | sample/perror.rb | 7 | ||||
-rw-r--r-- | sample/rcs.awk | 33 | ||||
-rw-r--r-- | sample/rcs.dat | 17 | ||||
-rw-r--r-- | sample/rcs.rb | 46 | ||||
-rw-r--r-- | sample/reach.rb | 5 | ||||
-rw-r--r-- | sample/resp.rb | 2 | ||||
-rw-r--r-- | sample/samp.rb | 3 | ||||
-rw-r--r-- | sample/sieve.rb | 1 | ||||
-rw-r--r-- | sample/split.rb | 1 | ||||
-rw-r--r-- | sample/struct.rb | 4 | ||||
-rw-r--r-- | sample/svr.rb | 3 | ||||
-rw-r--r-- | sample/system.rb | 1 | ||||
-rw-r--r-- | socket.c | 40 | ||||
-rw-r--r-- | spec | 2361 | ||||
-rw-r--r-- | sprintf.c | 5 | ||||
-rw-r--r-- | st.c | 1 | ||||
-rw-r--r-- | string.c | 33 | ||||
-rw-r--r-- | struct.c | 10 | ||||
-rw-r--r-- | time.c | 16 | ||||
-rw-r--r-- | version.h | 4 |
95 files changed, 2109 insertions, 3557 deletions
diff --git a/CVS/Entries b/CVS/Entries deleted file mode 100644 index 067e16dd65..0000000000 --- a/CVS/Entries +++ /dev/null @@ -1,51 +0,0 @@ -/autoexec.c/0.15/Wed Jun 1 23:40:54 1994 Thu Mar 17 18:49:43 1994// -/class.c/0.22/Wed Jun 1 23:40:54 1994 Fri Mar 25 13:12:36 1994// -/compar.c/0.15/Wed Jun 1 23:40:54 1994 Thu Mar 17 18:49:43 1994// -/dln.h/0.14/Wed Jun 1 23:40:57 1994 Thu Mar 17 15:55:00 1994// -/error.c/0.15/Wed Jun 1 23:40:57 1994 Thu Mar 17 18:49:43 1994// -/etc.c/0.22/Wed Jun 1 23:40:58 1994 Fri Mar 25 13:12:36 1994// -/ident.h/0.17/Wed Jun 1 23:41:00 1994 Wed May 25 00:56:16 1994// -/inits.c/0.27/Wed Jun 1 23:41:00 1994 Mon Apr 25 23:30:29 1994// -/io.h/0.14/Wed Jun 1 23:41:01 1994 Thu Mar 17 15:55:00 1994// -/methods.c/0.20/Wed Jun 1 23:41:01 1994 Tue Mar 22 16:58:31 1994// -/missing.c/0.29/Wed Jun 1 23:41:01 1994 Wed Jun 1 23:36:26 1994// -/parse.y/0.35/Wed Jun 1 23:41:08 1994 Wed Jun 1 23:36:30 1994// -/random.c/0.15/Wed Jun 1 23:41:09 1994 Thu Mar 17 18:49:43 1994// -/range.c/0.15/Wed Jun 1 23:41:09 1994 Thu Mar 17 18:49:43 1994// -/re.h/0.15/Wed Jun 1 23:41:10 1994 Thu May 26 00:41:30 1994// -/regex.c/0.15/Wed Jun 1 23:41:12 1994 Wed Jun 1 23:36:35 1994// -/regex.h/0.14/Wed Jun 1 23:41:12 1994 Thu Mar 17 15:55:00 1994// -/st.h/0.14/Wed Jun 1 23:41:14 1994 Thu Mar 17 15:55:00 1994// -/variable.c/0.29/Wed Jun 1 23:41:16 1994 Wed May 25 00:56:35 1994// -/version.c/0.27/Wed Jun 1 23:41:16 1994 Mon Apr 25 23:30:35 1994// -/Makefile/0.32/Fri Jun 3 00:15:00 1994 Fri Jun 3 00:15:00 1994// -/Makefile.in/1.3/Fri Jun 3 00:15:01 1994 Fri Jun 3 00:15:01 1994// -/array.c/0.29/Fri Jun 3 00:15:02 1994 Fri Jun 3 00:15:02 1994// -/configure/1.3/Fri Jun 3 00:15:04 1994 Fri Jun 3 00:15:03 1994// -/configure.in/1.3/Fri Jun 3 00:15:04 1994 Fri Jun 3 00:15:04 1994// -/dbm.c/0.28/Fri Jun 3 00:15:05 1994 Fri Jun 3 00:15:05 1994// -/defines.h/1.4/Fri Jun 3 00:15:06 1994 Fri Jun 3 00:15:06 1994// -/dict.c/0.28/Fri Jun 3 00:15:06 1994 Fri Jun 3 00:15:06 1994// -/dir.c/0.18/Fri Jun 3 00:15:07 1994 Fri Jun 3 00:15:07 1994// -/dln.c/0.29/Fri Jun 3 00:15:08 1994 Fri Jun 3 00:15:08 1994// -/enum.c/0.16/Fri Jun 3 00:15:09 1994 Fri Jun 3 00:15:08 1994// -/eval.c/0.35/Fri Jun 3 00:15:10 1994 Fri Jun 3 00:15:09 1994// -/file.c/0.29/Fri Jun 3 00:15:11 1994 Fri Jun 3 00:15:11 1994// -/gc.c/0.30/Fri Jun 3 00:15:12 1994 Fri Jun 3 00:15:12 1994// -/io.c/0.29/Fri Jun 3 00:15:13 1994 Fri Jun 3 00:15:13 1994// -/math.c/0.28/Fri Jun 3 00:15:14 1994 Fri Jun 3 00:15:14 1994// -/node.h/0.32/Fri Jun 3 00:15:15 1994 Fri Jun 3 00:15:14 1994// -/numeric.c/0.19/Fri Jun 3 00:15:15 1994 Fri Jun 3 00:15:15 1994// -/object.c/0.32/Fri Jun 3 00:15:16 1994 Fri Jun 3 00:15:16 1994// -/pack.c/0.18/Fri Jun 3 00:15:17 1994 Fri Jun 3 00:15:17 1994// -/process.c/0.30/Fri Jun 3 00:15:18 1994 Fri Jun 3 00:15:17 1994// -/re.c/0.32/Fri Jun 3 00:15:19 1994 Fri Jun 3 00:15:18 1994// -/ruby.c/0.34/Fri Jun 3 00:15:19 1994 Fri Jun 3 00:15:19 1994// -/ruby.h/0.30/Fri Jun 3 00:15:20 1994 Fri Jun 3 00:15:20 1994// -/socket.c/0.27/Fri Jun 3 00:15:21 1994 Fri Jun 3 00:15:21 1994// -/sprintf.c/0.23/Fri Jun 3 00:15:22 1994 Fri Jun 3 00:15:21 1994// -/st.c/0.15/Fri Jun 3 00:15:22 1994 Fri Jun 3 00:15:22 1994// -/string.c/0.29/Fri Jun 3 00:15:23 1994 Fri Jun 3 00:15:23 1994// -/struct.c/0.26/Fri Jun 3 00:15:25 1994 Fri Jun 3 00:15:24 1994// -/time.c/0.29/Fri Jun 3 00:15:26 1994 Fri Jun 3 00:15:26 1994// -/version.h/1.7/Fri Jun 3 00:15:27 1994 Fri Jun 3 00:15:27 1994// diff --git a/CVS/Repository b/CVS/Repository deleted file mode 100644 index b98482fac9..0000000000 --- a/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -/work/cvsroot/ruby @@ -1,1147 +1,4 @@ -Fri Oct 14 13:22:18 1994 Yukihiro Matsumoto (matz@ix-02) +Thu Dec 8 14:17:29 1994 Yukihiro Matsumoto (matz@ix-02) - * version 0.52: �ġĤʤ�Ƥ��ä���. + * 0.60 released - alpha test baseline. - * eval.c(rb_call): return�ν������ְ�äƤ����Τ�, �ޥ���ˤ�ä� - ��return�Ǵؿ���λ��������Ǥʤ�toplevel�ޤǤĤ�ȴ���Ƥ���. - - * object.c: Builtin���饹����. �Ȥ߹��ߴؿ���Kernel����ܤ���. - nil���Ȥ߹��ߴؿ�������ȥȥ�֥�θ��Ǥ���. - - * dbm.c: Dict��Ʊ�ͤ�each��[key,value]���֤��褦��. - - * version 0.51 - -Thu Oct 13 12:13:48 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c(SETUP_ARGS): �ղñ黻�Ҥ�����Ǥʤ����ˤ�������Ѵ�����. - - * parse.y: ��̤ʤ��Υ�åɸƤӽФ��Ǥ�`*'�ˤ���ղð������Ȥ��� - �褦�ˤ���. ������, �̾��������Ĥ�ʤ����Ͼ軻�黻�Ҥȶ��̤� - �Ĥ��ʤ��Τ�, ɬ����̤�ɬ��. - -Wed Oct 12 10:09:07 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c(rb_call): ����å���η���inline��. ����å���ߥ����� - ��дؿ��ƤӽФ��ǥ�åɤ�����. methods.c�Ϥʤ��ʤä�. - - * eval.c(rb_eval): ���������ѿ��Ѥ��ΰ��alloca()����褦���ѹ�. - ���������ѹ���ɬ�פˤʤ�в����malloc()����褦��. - - * parse.y: error recovery�κݤ�lex_state�����Ƥ����褦��. - -Tue Oct 11 17:10:46 1994 Yukihiro Matsumoto (matz@ix-02) - - * socket.c(for_fd): �ե����뵭�һ�(Fixnum)���饽���åȥ����� - �������å�. ���Ȥ���inetd���鵯ư���줿�����Ф�ɸ�������Ϥ� - �����å�����Ԥʤ�����˻Ȥ�. �Ĥޤ�Socket.for_fd($stdin)��ɸ - �����Ϥ��б����륽���åȥ��֥������Ȥ�������. - - * io.c(to_i): IO���饹�Υ������������Ѵ�����Ȥ��Υե����� - ���һҤ��֤��褦��. - - * numeric.c(num2int): to_i��åɤ�ȤäƤǤ���¤��������Ѵ�����. - ������num2fix���������ƤΥ��֥������Ȥ��Ф���to_i��åɤ�Ŭ�� - ���Ƥ���. - - * sprintf.c(Fsprintf): ����ɽ���κ�, ���֥������Ȥ�Ǥ���¤����� - ���Ѵ�����褦��(to_i��åɤ�Ȥ�). - -Fri Oct 7 14:06:32 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c(Fcaller): ɬ�������褯ʬ����ʤ��Τǥɥ�����Ȥ�����. - ����ǥХå�����������褵���褦. - - * eval.c(rb_call): C�ǵ��Ҥ��줿��åɸƤӽФ��ǤϴĶ����å� - �˥����֤��ʤ����Ȥˤ�äƹ�®��. - -Wed Oct 5 15:00:58 1994 Yukihiro Matsumoto (matz@ix-02) - - * ruby.h: ���env.h�˰�ư���Ƥ�Qself�����������. ����������ϴؿ� - �Ȥ��Ƽ¸�(env.h�Ǥ��ѿ��Ȥ��ƺ�������Ƥ���). - - * ruby.h: TRUE��syntax error�ˤʤ�ʤ��褦#undef���ɲ�. - - * eval.c(rb_eval): thread����ĩ�路����, ����(®���ʤ�ʤ��ä�). - ��, Scoping�ʤɤ�̵�̤ʥ����ɤκ���ȥ�åɸƤӽФ��ΰ������� - �Ȥ�inline���Ǽ㴳�ι�®����¸�����. �����ѤȤ���, argc, argv�� - ���δؿ��ƤӽФ��λ��ͤ��Ѳ�����(argv��self��ޤޤʤ��ʤä�). - - * eval.c(rb_call): ��åɸƤӽФ��ι�®��. - -Tue Oct 4 11:40:53 1994 Yukihiro Matsumoto (matz@ix-02) - - * ruby-mode.el: �����Ҥ��б�����. - - * parse.y: ¿��������rest��Ĥ���. ���ε�ǽ��Ȥ���optional������ - ���Ϥ���ñ�ˤǤ���(�Ϥ�). - - * pack.c(unpack): uuencode������decode�κݤ�ʸ�����Ĺ�����ְ�ä� - ����. - -Mon Oct 3 15:58:41 1994 Yukihiro Matsumoto (matz@ix-02) - - * file.c(type): �ե����륿���פ�ʸ������֤���å�. - -Fri Sep 30 11:36:07 1994 Yukihiro Matsumoto (matz@ix-02) - - * object.c: �ǥե���Ȥο����ͤǤ���%TRUE���ͤ�1(Fixnum)����t���� - ������. to_s��ʸ������Ѵ��������ˤ�`t'��ɽ�������. ����Ƨ�߹� - ���`t'��ͽ���ˤ���lisp�Τ褦�ˤ��褦���Ȥ�פä���, �����ޤ� - �Ϸ迴�Ǥ��ʤ��ä�. ��ʸ���Υ��������ѿ��Ϥ��ʤ�Ȥ������ʵ����� - ��Τǡ�. - - * array.c,dict.c: equal���������Ƥ��륯�饹��, hash����������� - ����. - -Wed Sep 28 23:30:28 1994 Yukihiro Matsumoto (matz@dyna) - - * eval.c(Ffail): ���ޤ�fail�ϥ����ͥ륯�饹�Υ�åɤǤ��ä���, - ��ʸ���Ȥ߹����. �����ѹ��ˤ�ä�, 1)`fail'��ͽ���Ȥʤ�, ���� - �����ѿ����Ѥ��뤳�Ȥ��Ǥ��ʤ��ʤä�. 2)`fail'ñ�Τ��㳰��ȯ���� - ��褦�ˤʤä�. 3)fail�ϥ�åɤǤϤʤ��ʤä��ΤǺ���������� - ǽ�����ʤ��ʤä�. - - * dic.c, dbm.c(indexes): Array��indexes��Ʊ�ͤε�ǽ����ĥ�å� - ���ɲ�. - - * array.c(indexes): ������ǥå����Ȥ������Ǥ�������֤�. ���� - �����������Ȥ�����ˤϰ��������Ǥ�ǥå����Ȥ������Ǥ����� - ���֤�. - -Mon Sep 19 13:42:31 1994 Yukihiro Matsumoto (matz@ix-02) - - * array.c(aset): ��ʬ������Ф�������������ʳ��Υ��֥������Ȥ��� - �ꤵ�줿����¿��������Ʊ���롼���������褦�ˤ���. - - * io.c(print): �����Ȥ���Ϳ����줿�ƥ��֥������Ȥ�print_on��å��� - ����Ϳ����褦��. �¹�®�٤�����뤬������������. - -Fri Sep 16 14:59:18 1994 Yukihiro Matsumoto (matz@ix-02) - - * glob.c: �磻��ɥ����ɤ�Ƴ��. bash�˻Ȥ��Ƥ���GNU��glob�롼�� - ���ή�Ѥ���. - -Mon Sep 12 18:36:58 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y(value_expr): ����nil�λ����б�. - - * class.c: ICLASS��class��ɬ��Class/Module��ؤ��褦��. - -Tue Sep 6 16:23:28 1994 Yukihiro Matsumoto (matz@ix-02) - - * re.c: ����ɽ����ǡ�\��������������Ǥ���褦��. - - * parse.y:��do expr using var ... end�����Ϥʤ��ʤä�. �䤷���� - �⤹��. *BACKWARD INCOMPATIBILITY* - -Mon Sep 5 10:59:01 1994 Yukihiro Matsumoto (matz@ix-02) - - * numeric.c(next): Numeric���饹�ˤ�next����. - - * string.c(upto): upto����. - - * range.c(each): next��Ȥä����ե���������upto��Ȥ��褦���� - ������. ����������ĤΥ�åɤǽ�����ޤȤ�ǹԤʤ����Ȥ��Ǥ���. - -Fri Sep 2 15:25:39 1994 Yukihiro Matsumoto (matz@ix-02) - - * dict.c(each): ����ͤ�[key, value]�Υڥ����ѹ�. ���ޤǤ�each�� - each_value�Ȥ��ƻĤ�. *BACKWARD INCOMPATIBILITY* - -Thu Sep 1 10:49:04 1994 Yukihiro Matsumoto (matz@ix-02) - - * ��������(���̤�����ͤ�����ʤ�)�����ƥॳ�����`0'���֤��褦��. - -Wed Aug 31 00:26:51 1994 Yukihiro Matsumoto (matz@dyna) - - * string.c: �����å�����������å�`sum'���ä�. - - * class.c(include_class_new): ICLASS��class���ȤΥ��饹�ˤ���. - gc�κݤ˸����饹��ޡ�������ɬ�פ�����Τ�, �ե�����ɤ����䤹; - �Ϥ�̵���Τ�, class�ե�����ɤ�ή�Ѥ���. ��θ��Ѥ꤬�ְ�äƤ� - ��, ICLASS�Υ����˥�å�������������������, ��������ư - ��������. - - * eval.c(masign): ��(a,b = nil)���ͤ�[nil]����nil���ѹ�����. - -Mon Aug 29 11:56:09 1994 Yukihiro Matsumoto (matz@ix-02) - - * class.c: rb_define_mfunc��̵������, ����饹�˥⥸�塼��� - ���롼�ɤ���褦�ˤ���. - - * error.c(yyerror): Ʊ���Ԥ�ʣ����syntax error���ݡ��Ȥ��ʤ��褦 - �ˤ���. - - * file.c: FileTest�⥸�塼��˥ե�����ƥ��ȥ�åɤ�ʬΥ����. - - * parse.y: �黻�Ҥ���ꤹ�����lex_state�����������ꤷ��. - -Sat Aug 27 01:23:34 1994 Yukihiro Matsumoto (matz@dyna) - - * parse.y: if/while�ʤɤ�ʣ�缰��primary�˰�ư����. ����ˤ�ä��� - ���С�if cond then a else b end.message()�פΤ褦�ʼ������ - ���ˤʤä�. - -Fri Aug 26 10:46:30 1994 Yukihiro Matsumoto (matz@ix-02) - - * spec: �������줿ʸˡ�ˤ������äƽ�ľ����. - - * parse.y: ���������Ǻ��𤷤Ƥ���ʸˡ����������. ��̤��ά������ - ���åɸƤӽФ����Ǥ���褦�ˤʤä�����, modifier���դ�����褦 - �ˤʤä�����, return�˥ꥹ�Ȥ��Ϥ���褦�ˤʤä����Ȥ�����ѹ��� - �Ǥ���. - - * process���꤬���������Ȥˤ���Solaris 2.3��ư���褦��. - - * parse.y: ۣ�������ʤ����ˤϥ�åɸƤӽФ��ΰ����γ�̤��ά - �Ǥ���褦��. ��ά�Ǥ����åɸƤӽФ��ξ���, 1)���ʤ餺1�� - �ʾ�ΰ�����ɬ�פȤ��뤳��, 2)��1������`+', `-', `(', `[', `{', - `/'�ʤ�, ���λϤޤ���֤��줿��������˸��줿���ȤDz��㤦�� - ��ǻϤޤ�ʤ�����, �Ǥ���. - -Thu Aug 25 13:54:58 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y(cond): ��P��Ÿ������bug�����ä�. - -Wed Aug 24 00:01:15 1994 Yukihiro Matsumoto (matz@dyna) - - * parse.y: return�ϥ���ޤǶ��ڤä��ꥹ�Ȥ�������褦��. �Ĥޤ�, - return a, b, c��return [a, b, c]��Ʊ����̣�ˤʤ�. - - * parse.y: yield�ʳ������æ�����漰��expr����expr0�˰ܤ���. ��� - �ƥ�åɤΰ��������漰��Ȥ��ʤ��ʤ�(����Ǻ���ͤϤ��ʤ��Ϥ�). - - * parse.y: `+'�����Ÿ���κݤ˱黻�Ҥ�ͥ���̤�˺��Ƥ���. - - * eval.c: until������ͤ�nil�ˤʤä�. - - * parse.y: modifier�Ȥ��Ƥ�if/unless/while/until���ɲ�. - - * parse.y: ʸˡ����end�θ���ˤĤ��륭����ɤ���. �ۤȤ�ɻȤ� - �ʤ��ä����, emacs�Ǥ�ruby-mode��������б��Υ����å�������Ū�� - ����뤿��. - -Tue Aug 23 18:08:33 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c: ������ץȼ¹Գ��������㳰��ȯ����������core dump����. - �Ȥ߹����Ѥ˥����ɤ��ѹ���������enbug���Ƥ��ޤä�. - -Tue Aug 23 00:07:17 1994 Yukihiro Matsumoto (matz@dyna) - - * eval.c: do������ͤ����Ĥ�nil�ˤʤäƤ���. - - * parse.y: loop�����ѿ���¿����������bug�����ä�. - - * parse.y(expand_op): ʸ�������߹��ߤ��оݤ�. - -Mon Aug 22 10:50:01 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y(expand_op): `+'�˴ؤ��ƤϷ��§��Ȥä�, ���¿������� - �߹��ߤ�Ԥʤ��褦��. - - * ruby.c(proc_options): argc��0�λ��ˤ��б�. - - * parse.y: for�ʤɤ������ѿ���¿��������Ȥ���褦��. - -Sat Aug 20 00:59:40 1994 Yukihiro Matsumoto (matz@dyna) - - * parse.y(call_op): �黻��`~'�μ�갷����롼�����ذ�ư. - -Fri Aug 19 11:44:13 1994 Yukihiro Matsumoto (matz@ix-02) - - * main.c: ruby��ۤ��Υץ��������Ȥ߹����褦��main()��ʬ�䤷��. - ����ˤȤ�ʤ�, �ץ������θƤӽФ���¤��������. - - * parse.y: ��P��������ѹ�. if�ʤɤξ�P����Ǥ���`&&'��`||' - �����`!'�ΰ�������P�ˤʤ�褦��. �����ѹ��ˤ���P�ʳ��� - ���Ǥ� `&&', `||', `!'�黻�Ҥ�ư�ľ�Ѥ˰��פ���. - - * parse.y: �°�����`*'�θ��³��������expr�����¤���. ���ޤǤ����� - ��ʸ��ͭ���Ǥ��ä���, ���������ʸ�����äƤ⤷�礦���ʤ�. - -Thu Aug 18 10:21:45 1994 Yukihiro Matsumoto (matz@ix-02) - - * re.c: ����ɽ���롼����ν������ʬ�������Ƥ��ޤäƤ���. ����� - ��emacs������ɽ���ˤʤäƤ��ޤ�. - - * version.c: copyrightɽ�����ɲ�. - - * version.c: �С������ɽ����stderr��. - - * configure.in: gcc���ʤ����test�˼��Ԥ��Ƥ���. - -Fri Aug 12 14:12:23 1994 Yukihiro Matsumoto (matz@ix-02) - - * array.c(astore): ����γ��礹����ˤ������٤��礭����ޤȤ�Ƴ� - �礹��褦��. - - * io.c(Fprint): ������Ф��Ƥϰ���ʸ������Ѵ����뤳�Ȥʤ�, ľ���� - �Ƥ���Ϥ���褦��. - - * string.c(str_new): memmove����memcpy���֤�������. ����Ǥ⤫�ʤ� - ®�٤��㤦. - - * ruby.h: �ǡ������Фμ��Ф���̾����ʸ����ID�ǻ��ꤹ��褦 - �ˤ���. ���ʤ�ι�®���ˤʤ�. - - * io.c: $ARGF�Ȥ����ѿ��ǰ�����ʤ벾�ۥե�����֥������� - �Ȥ��ư�����褦�ˤ���. ���ޤǤϥȥåץ�٥��gets()�ʤɤ�Ȥä� - �����������Ƥ�����, �ɤ��⥪�֥������Ȼظ�Ū�ǤϤʤ��ä�. - -Thu Aug 11 11:43:15 1994 Yukihiro Matsumoto (matz@ix-02) - - * gc.c: mark_location()�δְ�ä��ƤӽФ����ιԤ��ĤäƤ���. - - * method.c: �ץ��ȥ������������ʤ��ä�. - -Wed Aug 10 15:54:46 1994 Yukihiro Matsumoto (matz@ix-02) - - * variable.c: -v���ץ�����ꤵ��Ƥ�����Ͻ��������Ƥ��ʤ�, - ����ѿ�, �������ѿ�, ���������ѿ��Ȥ���������warning - ��Ф��褦�ˤ���. - -Tue Aug 9 11:50:48 1994 Yukihiro Matsumoto (matz@ix-02) - - * bignum.c: �Ѿ�˴ؤ��Ƥ�¿��Ĺ�黻��Ԥʤ��褦��. �ä���ư������ - �����ϰϤ�ۤ������ν�����Ū�Τ˹Ԥʤ��褦��. - - * eval.c: ��å������Ϲ�ʸ�ڤ���, ��å������ʬ��. ̵�� - �ʺ������������ʤ��褦�ˤ��뤿���2�Ť�free()����ʤ�����. - - * array.c(Fary_aref): ������1�Ĥ�Fixnum�λ�, Range check��Ԥʤ�� - ���褦�˽���. - - * eval.c: ��åɤΰ����ο���ѥ�����˷����Ƽ㴳�ι�®��. - -Mon Aug 8 13:06:24 1994 Yukihiro Matsumoto (matz@ix-02) - - * object.c: nil�ˤ�����Ϣ����ʤ�����. - - * parse.y: bit�黻�Ҥ�ͥ���̤���ӱ黻�Ҥ��������. C�Ȥϰ� - �ʤ뤳�Ȥˤʤ뤬, ľ�ѤˤϹ��פ���. - - * gc.c: ���饹����������, �ġ��Υ�å���˥���å���ꥢ�� - ��ΤǤϤʤ�, ���饹ñ�̤ǥ��ꥢ����褦��. - -Thu Aug 4 18:45:09 1994 Yukihiro Matsumoto (matz@ix-02) - - * methods.c(method_free): �������줿��åɤ˴ؤ��ƥ���å���� - �ꥢ���Ƥ���ɬ�פ����ä�. - - * gc.c: Data���饹�Υǡ�����ʬ��free()��˺��Ƥ���. - -Wed Aug 3 09:58:14 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y: def func .. end�����ˤ��ؿ���åɤ�����Ϥʤ��ʤä�. - - * methods.c: func�����Υ�åɤ�ʤ�����. ���äƤ�, ���ޤ��̣�� - �ʤ��Τ�. - - * eval.c: $0�ؤ�������ps(1)�ν��Ϥ��Ѳ�����褦��. - - * io.c(Fsyscall): syscall()��¸�. - -Mon Aug 1 13:41:11 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y: ���֥륯�����ȤǰϤޤ줿ʸ���������ɽ�����"#{�ѿ�̾}" - �ޤ���"#�ѿ�̾"�Ȥ����������ѿ������Ƥ������ळ�Ȥ��Ǥ���褦 - �ˤʤä�. - - * io.c: �ؿ���å�system2()�Ϥʤ��ʤä�. ���ϥХå��������Ȥ��� - �뤫���. - - * parse.y: `cmd`�ˤ�äƥ��ޥ�ɤ�ʸ�����Ÿ�����뤳�Ȥ��Ǥ���褦 - �ˤʤä�. - - * parse.y: __FILE__, __LINE__���ɲ�. ���줾��ե�����̾(ʸ����), - ���ֹ�(����)���ͤȤ��뵿���ѿ�. - -Fri Jul 29 13:16:07 1994 Yukihiro Matsumoto (matz@ix-02) - - * methods.h: ��åɤ֥������ȤȤ��ư����Τ����. ��å� - �Υ�������ˤϥ�ե��������Ȥ�Ȥ����Ȥˤ���. ����ǥ��� - �������Ȥο������äƤۤ�ξ�������GC��®���ʤ�(����). - - * purify�ˤ�äƥ���ط��ΥХ�������(���Ĥ���,���Ĥ����). - - * gc.c: GC��ץ�����ޤ��ѿ���ޡ��������������, �����å��ȥ쥸�� - ������ޡ���������ˡ���ѹ�. �ܿ�����������褦�ʵ��⤹�뤬, siod - ��scm�Ǥ���Ѥ���Ƥ��뤫��¿ʬ����פ�����. Linux on i486�Ǥ�ư - ����ǧ����. - -Wed Jul 27 16:13:13 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c(Eval): �ȥåץ�٥�ǤϹ�¤�ڤ�free���ʤ��褦��. �ɤ����� - ������뤫����֤�̵�̤Ǥ���. - - * array.c, dict.c: "=="��¤���פ��ѹ�. - -Fri Jul 22 10:14:09 1994 Yukihiro Matsumoto (matz@ix-02) - - * error.c: �Ȥ߹��ߥ����פ�̾������Ͽ��˺��Ƥ���. - -Thu Jul 21 14:06:48 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y(freenode),eval.c(Eval): �����ڤ������˺��Ƥ���. - -Mon Jul 18 10:19:15 1994 Yukihiro Matsumoto (matz@ix-02) - - * parse.y: ¿���������������롼��˥Х������ä�, 3���ǰʾ��¿�� - �����˼��Ԥ��Ƥ���. - - * eval.c(rb_eval): ¿��������, ���դ�����Ǥʤ����ˤ�`to_a'��� - �ɤ�������Ѵ�������������褦�ˤ���. ���ޤǤλ��ͤ��ȱ����ͤ��� - 1���Ǥˤ��Τޤ���������Ƥ�����, struct�ʤ�������Ѵ��Ǥ����� - ���Ѵ�������������������. - - * dbm.c,dict.c(delete_if): ��å��ɲ�. - - * process.c(wait,waitpid): �����ƥॳ����waitpid�ޤ���wait4������ - ���Ϥ������Ȥ��褦��. configure�⤽��������å�����褦���ѹ�. - - * dbm.c, dict.c(clear): ��å��ɲ�. - -Fri Jul 15 10:54:45 1994 Yukihiro Matsumoto (matz@ix-02) - - * array.c(Fary_fill,Fary_clear): ��åɤ��ɲ�. - - * string.c(Fstr_split): $;���ͤ�Ĺ��1��ʸ����Ǥ����, ��������� - ɽ�������ʤ���, ñ�ʤ�ʸ���Ȥ���ʬ�䤹��. - - * string.c(Fstr_aset/Fstr_aref): ����ǥå�����ʸ������ϰϳ����� - ������ư���Array�ͤ˽�������. - - * array.c(astore,Fary_aset): �ΰ��realloc������, �����ǥ��ꥢ���� - �褦��. ���ޤ�����˥��ߤ����äƤ���. - - * array.c: []/[]=�ǤΥ���ǥå����ط�������. ����Ū����Υ���ǥ� - �������������ʤ��¤��㳰�ϵ����ʤ��褦���ѹ�����. ɬ�פ˱�����Ŭ - ���˲�ᤷ��, ɬ�פʤ���ΰ���ĥ����褦��. - -Thu Jul 14 11:18:07 1994 Yukihiro Matsumoto (matz@ix-02) - - * autoexec.c: ���. autoload�ط��ε�ǽ�Ϻ��帡Ƥ���褦. - - * dict.c: ���饹������̾�Τ�Dict���ѹ�����. ��̾�Ȥ���Hash���� - �դ���. ���ޤ�Dictionary�ʤɤ�Ĺ��̾���ˤ��Ƥ�����ï��ȤäƤ��� - ���ä�����. *BACKWARD INCOMPATIBILITY* - - * parse.y: Dict���������빽ʸ���ɲ�. �������{..}�ˤ���. - - * parse.y: ������������빽ʸ��[..]���ѹ�����. ����Ruby������� - �ȤȤθߴ������ݤƤʤ���, Dict���������빽ʸ��Ƴ�������������, - perl5�˹�碌��(�ռ�����), �ѹ���������Ϻ������ʤ��ȹͤ���. - *BACKWARD INCOMPATIBILITY* - - * eval.c(Feval): eval()�ǥ�åɤ���������, �������륯�饹�� - ��åɤν�°���륯�饹�ˤ���. ���ޤǤ�Object���饹���������� - ����. - - * parse.y: ��������������ʤ�����eval()������Ƥ���. - -Tue Jul 12 09:41:28 1994 Yukihiro Matsumoto (matz@ix-02) - - * pack.c: uuencode�����Υ��ݡ���. - - * `-0'��`-R'��. ���ϥ쥳���ɥ��ѥ졼���ޥ�ɥ饤����ꤹ�� - ��ˡ�Ϥʤ��ʤä�. �ɤ���, ���ͤ�����ʤ�. - -Mon Jul 11 09:51:24 1994 Yukihiro Matsumoto (matz@ix-02) - - * ruby.c: `-r'���ץ�����`-0'���ץ����ˤʤä�. ���̤�`-r'��ͭ�� - �����ѹ�������ǽ��������. `-R'�����̤Ϥ��Τޤ�. - - * version.c: versionɽ�������դ�ޤ. - - * parse.y: private method������. Ruby��private��åɤ�C++�ˤ��� - ��protected method�˳��������Τ�, `@'�ǻϤޤ�̾�������. - - * env.h: struct ENVIRON�������ʬΥ. - - * parse.y: `\$var', `\@var', `%var'������褦��. - - * variable.c(Fdefined): id������Ȥ��Ƽ����դ���褦��. - - * parse.y: ifʸ/unlessʸ�˥������then���ɲ�. then�ʤ��Ȥ����Τ�, - �ճ��ȴְ㤤��¿���Τ�. ��������ά�Ǥ���. - -Sat Jul 9 02:16:04 1994 Yukihiro Matsumoto (matz@dyna) - - * eval.c(rb_eval): class/module��ɾ���ǿ������������פ������Ƥ� - ���ʤ��ä�. �������׳��������ʬ��rb_call()����rb_eval()�˰ܤ���. - - * eval.c(rb_call): realloc()���Ϥ������Τ���, ���������ѿ��Ѥ��� - ���alloca()���Ƥ���. ���ޤ������櫓��. - - * string.c(Fstr_times): ������Ƥ��ΰ��ۤ�����ʬ���ѹ����Ƥ���. - -Wed Jul 6 15:52:42 1994 Yukihiro Matsumoto (matz@ix-02) - - * socket.c: Socket -> BasicSocket, RawSocket -> Socket �˲�̾. - - * string.c(ucfirst,lcfirst): �ǽ��1ʸ����������ʸ��/��ʸ���Ѵ�. - - * numeric.c(chr): ������ʸ����å�. - - * inits.c, dbm.c: DBM���Ȥ��ʤ����ϥ��饹���Τ�Τ�������ʤ��褦 - �ˤ���. ���ѤǤ��ʤ����饹��nil�Ȥ��뤳�Ȥ�Υݥꥷ���Ȥ��� - ��(���ޤޤǤϥ����������������ǥ��顼��ȯ�����Ƥ���). autoexec() - �Τ������⸡Ƥ��ɬ�פˤʤꤽ����. - - * bignum.c(bigadd): �Х�����. - -Thu Jul 7 11:12:18 1994 Yukihiro Matsumoto (matz@ix-02) - - * eval.c(Fload,Feval): eval_tree�ꥢ��˺��Ƥ���. - - * _inspect: ���֥������Ȥ���ɷ�����ʸ������Ѵ�����(��˥ǥХå� - ������). - -Wed Jul 6 00:57:18 1994 Yukihiro Matsumoto (matz@dyna) - - * numeric.c, bignum.c: �������Ф���`[]'�黻��. n�ӥå��ܤ����åȤ� - ��Ƥ��뤫�ɤ������֤�. - -Tue Jul 5 12:48:39 1994 Yukihiro Matsumoto (matz@ix-02) - - * io.c(Feof): �ɲ�. ���ޥ�ɥ饤��ʤ벾�ۥե�����ˤĤ��Ƥ� - EOF�����ФǤ���褦��. - - * ruby.c: -l/-r/-R/-X���ץ������ɲ�. - - * ruby.c: -n/-p���ץ�����loop���ղäʤɤ�ᥤ��롼����˰�ư�� - ��. �����, ���ץ����β��������(`-c'���ץ����Τ�����)��λ�� - �ɤȤ��ä����ȤϤʤ�. - - * io.c(Fgets): ��®��. �Ťä����Ȥʤ�����®���ä�. ������. - -Mon Jul 4 15:55:48 1994 Yukihiro Matsumoto (matz@ix-02) - - * Socket:getsockname/getpeername - �褦�䤯���ͤ����ꤷ��. - - * io.c(Fgets): each��gets�Ҥ���ΤǤϤʤ�, gets��each�Ҥ� - ��褦�ˤ���. - -Fri Jul 1 10:35:49 1994 Yukihiro Matsumoto (matz@ix-02) - - * $ENV[env] = nil/$ENV.delete(env)�ǴĶ��ѿ������Ǥ���褦�ˤʤ� - ��. $ENV.delete�ϴĶ��ѿ��ΰ������ͤ��֤�. - - * !~��������ְ�äƤ���. - - * Dict,DBM:[]= - nil�������ˤ�ä����Ǥ����Ǥ���褦�ˤʤä�. �� - ��ˤȤ�ʤ�nil��Dict�����Ǥˤʤ�ʤ��ʤä�. - - * ������������. ��IJ�Τ褦�ʻȤ��Ƥ��ʤ������ɤ�ʤ�������, �ѿ� - ̾���դ��Ѥ����ꤷ��. - -Fri Jul 1 00:21:29 1994 Yukihiro Matsumoto (matz@dyna) - - * Array:join() - ���ǿ�0��������Ф��ƶ�ʸ������֤�. - - * RawSocket:open(),socketpair() - ʸ����ǻ���Ǥ���ɥᥤ��ȥ��� - �פ��Ĥ��ɲä���. - -Thu Jun 30 13:51:29 1994 Yukihiro Matsumoto (matz@ix-02) - - * -f���ץ�����ʤ�����. ��(load�Τʤ��ä���)��̾�ĤʤΤ�, ���Ȥʤ� - �Ƥ�ɬ�פʤ�������. - - * -s���ץ������ɲ�. perl��-s���ץ�����Ʊ��ư����. - - * RawSocket���饹������. Socket���Ф��륷���ƥॳ�����٥�� - ������������ǽ�ˤʤä�. - -Thu Jun 30 00:27:19 1994 Yukihiro Matsumoto (matz@dyna) - - * Socket - bug fixes. - - * linux�Ǥ�syscall(SYS_select)�������ư��ʤ�. - - * Socket:addr,peeraddr - ����Ȥ���sockaddr�ξ�����֤�. - -Wed Jun 29 00:14:20 1994 Yukihiro Matsumoto (matz@dyna) - - * Socket:setopt,getopt - setsockopt(2), getsockopt(2)�ؤΥ������� - ��¸�. - - * sprintf() - ruby�ˤ�unsigned��̵���Τ�, %u���������. - - * sprintf() - %b, %x, %o�Ǥ�2�����ɽ��, %B, %X, %O�Ǥ�����դ�ɽ - ���ǽ��Ϥ���褦��. ����������sprintf()�λ��ͤ���餤�Ǥ�����, - ���������夭������. - -Tue Jun 28 14:42:03 1994 Yukihiro Matsumoto (matz@ix-02) - - * Bignum:<<,>> - 2�������Ȥ�����������. ���եȱ黻�ˤϴط��ʤ� - �������ä�. - - * Bignum:^ - bug fix. ��礬ȿ�Ф��ä�. - - * sprintf() - 2�ʽ��ϻ�"%b"���ɲ�. - - * sprintf() - %x, %o��Fixnum����Ϥ����, 2�����ɽ����Ԥʤ�ʤ�. - - * sprintf() - %x, %o�Ϥ�Ϥ���ο��λ���`-'����Ϥ���褦��. - -Mon Jun 27 14:56:13 1994 Yukihiro Matsumoto (matz@ix-02) - - * sprintf() - Bignum�ˤĤ��Ƥ�%d, %o��(2�����ɽ�����Ѵ�����)���� - ������ɽ������褦�ˤ���. - - * Bignum���Ф��������黻�������������. ��ο���2�����ɽ���Ǥ� - ��Ȥߤʤ�, ���IJ���Ū�˺�¦��̵�¤�1��Ϣ³���Ƥ���褦�ʱ黻�� - �̤�����. - - * Fixnum:<<,>> - ����ե��եȤ��ѹ�. - - * Bignum:>> - ��������Υ��եȤ��б�����. - - * __END__, ^D, ^Z�ǥ�����ץȤ�λ�Ǥ���. - - * -x���ץ������ɲ�. #! ..ruby�ʤ�Ԥޤ��ɤ����Ф�. - - * -c���ץ������ɲ�. ����ѥ���Τߤ�Ԥ�. - -Sat Jun 25 01:37:21 1994 Yukihiro Matsumoto (matz@dyna) - - * Fixnum:<< - ɬ�פ˱�����Bignum�˳�ĥ���ƺ����եȤ���褦��. ��� - ��, ���ե�����32��ۤ����C��Perl�Ȥϰ�ä��ͤ��֤�. - -Fri Jun 24 10:01:28 1994 Yukihiro Matsumoto (matz@ix-02) - - * ioctl()/fcntl() - �����ƥॳ�����ƤӽФ����˥Хåե����礭���� - Ĵ�᤹��褦�ˤ���. - - * String:toupper/tolower - ʸ������֤����������ԡ�����ΤǤϤ� - ��, ����ʸ��������Ƥ��ѹ�����褦�ˤ���. - - * inplace edit��¸�����. perl��Ʊ���褦��`-i'���ץ����ǻ��ꤹ��. - ��äȤ�, �������MS-DOS�Τ��ȤȤ��ͤ��Ƥʤ�����. - - * �ǥե���Ȥν�������ɲä���. ���ޤǤ�$stdout���������뤷����ˡ - �Ϥʤ��ä�. - -Fri Jun 17 10:55:08 1994 Yukihiro Matsumoto (matz@ix-02) - - * �Ķ��ѿ��˥�������������ˡ�Ȥ���getenv()/setenv()�ʳ���$ENV���� - �դ���. $ENV��ʸ����-ʸ����μ���Ǥ��뤫�Τ褦��ư���EnvDict - ���֥������Ȥ���������Ƥ���(each��assoc��Ϳ����). - - * nil�����������core dump����. ����ѥ�����Υ����å���. - - * Struct: struct_new()�ΰ�����GC�ץ��ƥ��Ȥ���ɬ�פ�����. ����ƥ� - ���å��ΰ�����Ǥ⥹�����Ǥ���褦�ˤ��ʤ���Ф����ʤ�������� - ��? �Ǥ�, �ܿ������ʤ�. - -Fri Jun 17 01:01:46 1994 Yukihiro Matsumoto (matz@dyna) - - * Time::asctime() - ���դΥե����ޥåȤ���������Ƥ���. - - * Stat: Stat��Etc�ʤɤ�Ʊ�ͤ�Struct�Ǽ¸������Τ�, Stat���饹��̵ - ���ʤä�. - -Thu Jun 16 10:32:23 1994 Yukihiro Matsumoto (matz@ix-02) - - * bignum.c: �����Ĥ��ΥХ���������. Fixnum���Ϥ��٤��Ȥ��������� - ��int���Ϥ��Ƥ���. ����. - - * big2str() - 1�夺��base�dz�������, 4�夺�ij任��Ԥʤ��褦�� - ����. �����¿��Ĺ�任�β����1/4�ˤʤ�. ���������->��(ʸ��)�� - ���Ѵ���ơ��֥���Ѥ���褦�ˤ���. - - * rb_ivar_get_1() - ���Ǥ˲��餫�Υ������ѿ�����ĥ��֥����� - �ȤǤ�, ̤����Υ������ѿ����ͤ������ͤˤʤäƤ���. - - * yylex() - �������ѿ���ǧ���˼��Ԥ��Ƥ���. attr()��������ư - ��Ƥ����Τ�, ���Ѥ����ư��ʤ��ä�. ������äƤ�������ư�� - �Ƥ����Τ�. - - * Object:attr() - ���Ǥ˥���������åɤ��������Ƥ�����ˤϥǥե� - ��ȤΥ���������åɤ�������ʤ��褦�ˤ���. ��äȤ⥢�������� - ���åɤ�Ʊ̾�Υ�åɤζ��̤�Ruby�ˤ�¸�ߤ��ʤ�����, ����ϻ��� - ���ʤ����. - - * pack.c: ����ǥ������autoconf��Ƚ�ꤹ��褦�ˤ����Τ�, v/V���� - ����褦�ˤʤä�. �ޤ�ntoh?()/hton?()�⼫�����Ѱդ���. - - * Stat: st_rdev�����������åɤ��ɲ�. ����˥����ƥबstat - ��¤�Τ�st_blksize, st_block����äƤ��뤫��autoconf�ǥ����å��� - ��褦�ˤ���. - - * �ɥ�����Ȥ���������. - - * INT2FIX()�Τ���, 31bit�����ݾڤǤ��ʤ���Τ�, int2inum()���֤��� - ����. - -Wed Jun 15 10:18:27 1994 Yukihiro Matsumoto (matz@ix-02) - - * sprintf() - bignum�ν��Ϥλ�, ��������������������褦�ˤ���. - - * str2inum() - base��0�λ�, base��ưȽ�ꤹ��褦��(0x�ǻϤޤ�� - 16 ��, 0�ǻϤޤ��8��). - -Tue Jun 14 16:08:42 1994 Yukihiro Matsumoto (matz@ix-02) - - * gc.c: Bignum�����ɲä���Τ�˺��Ƥ���. �Ȥ߹��߷����ɲä������� - ��ɬ��mark()��sweep()�ˤ��η��˴ؤ���������ɲä���ɬ�פ�����. - - * bignum: �任��ư�����褦�ʵ�������. ���르�ꥺ������Ƥ��ʤ� - �Τ�, �������ʤ�. - -Mon Jun 13 14:36:55 1994 Yukihiro Matsumoto (matz@ix-02) - - * �ޤ����ݡ��Ȥ��Ƥ��ʤ���åɤʤɤ����뤬, �ʤ���ʤ�ˤ�Bignum - ���Ȥ���褦�ˤʤ�. �����ioctl��Ȥ���. - -Fri Jun 10 17:26:42 1994 Yukihiro Matsumoto (matz@ix-02) - - * Comparable: ���äȤʤ��åɤ�`=='��`>'����`<=>'���ѹ�����. �� - ��Comparable�Υ��֥��饹��`<=>'��������������ɬ�פ�����. - -Wed Jun 8 13:12:18 1994 Yukihiro Matsumoto (matz@ix-02) - - * Need_Fixnum()��ۤȤ�ɤʤ�����, NUM2INT()��ľ��int���Ѵ����뤳 - �Ȥˤ���. �����31bit�˴ݤ�Ʒ�����������꤬�ʤ��ʤ�. - -Tue Jun 7 09:45:31 1994 Yukihiro Matsumoto (matz@ix-02) - - * ruby.h: �ޥ���FIXABLE(n)���ɲ�. �Ĥ��Ǥ�FIXNUM�����������ѹ��� - ��, �ܿ������(�Ĥ��). - - * C++��ͽ���Ǥ���new��������. ������, �⤦�ҤȤĤ�ͽ���Ǥ��� - class�˴ؤ��Ƥ�, �֤�������ñ�줬�פ��Ĥ��ʤ����Ȥ⤢�äƤ��Τ� - �ޤˤʤäƤ���. - - * 31bit��ۤ�������INT2FIX()��ؿ��ƤӽФ����Ѥ���. ����bignum��Ƴ - �����줿���ˤϼ�ưŪ��bignum���֤��褦�ˤ���. - - * readline() - ������`-'��ɸ�����Ϥ��̣����褦�ˤʤä�. - - * ruby.h: �����եȤ��������եȤ����ѥ��եȤ��Ͻ����ϰ�¸�Τ褦�ʤ� - ��, ruby.h��cpp��Ȥäƥ����å�����褦�ˤ���. ����Ǥ��ޤ����� - �Ȼפ��Τ���, �긵�������int���������եȤ�������Ϥ��ʤ��Τdz� - ǧ�Ǥ��ʤ�. NEWS-OS��CC�ϳΤ������եȤϤ��Ĥ��������եȤ��ä��� - ���ʵ������������ɡ�. - -Mon Jun 6 10:10:22 1994 Yukihiro Matsumoto (matz@ix-02) - - * FIX2INT()��������ѹ�����. �ɤ������ΤϤ��ޤ�ư���ʤ��ä������ - ����? �⤷������, �����եȤ�����ĥ�Ͻ����ϰ�¸? - - * FIX2INT()��FIX2UINT()��Ȥ�ʬ����褦�ˤ���. ��äȤ�fixnum��31 - �ӥåȤ����ʤ��Τ�, �ܼ�Ū�ʲ��ˤϤʤ�ʤ��Τ���(ioctl���Ȥ߹� - �ߤ����ä�). - - * print��ؿ�Ū��åɤ����̾��åɤ��ѹ�. ������Ϳ�����ʤ� - ���ˤϥ쥷���Ф�ץ��Ȥ���褦�ˤ���. �����print���å����� - �����Ǥ�¹ԤǤ���褦�ˤʤä�. ��: - - ruby -e 'readlines().sort.print' - - ��Υ�����ץȤ�, �����Ȥ���Ϳ����줿(���뤤��ɸ�����Ϥ����ɤ� - ���ޤ줿)ʸ�����ƹ���˥����Ȥ���ɽ������. - - * eval.c: argc,argv�ѥ�����ǰ�����������åɤ˰�������Ĥ�Ϳ - �����ʤ���, argv��nil�ˤʤäƤ���(argv[0]�˥��������������� - �Ƥ��ޤ�). - - * _exit()���ɲ�. ��������㳰�����ʤɹԤʤ�ʤ�. - - * dbm���饹: ���饹̾�Τ�DBM(��ʸ��)�����줷��. - -Sat Jun 4 00:51:04 1994 Yukihiro Matsumoto (matz@dyna) - - * �롼���ѿ��ˤ�°�����������Ǥ����Ǥ���褦�ˤ���. - -Fri Jun 3 09:49:48 1994 Yukihiro Matsumoto (matz@ix-02) - - * ¿�������ˤ�����, °������, �������Ǥؤ�������Ԥʤ���褦�ˤ���. - - * Need_Fixnum(): nil��0���Ѵ�����褦��. - - * Enumerable:min, max, index, includes - �ɲ�. min, max�����Ǥ� - `<=>'��åɤ���Ĥ��Ȥ��ꤷ�Ƥ���. - - * Dict/Dbm:length - ���ǿ����֤���å�. - - * Dbm���饹��to_a��åɤ��ɲ�. - - * Sun�ˤ�����sort�θ�ư��η�, �����ν�����fix���줿. ������, ���� - �Ǥʤ�ư���ʤ��ä��Τ������餫�ǤϤʤ�����. ��Ӵؿ����ɤ���ͤ� - �֤��Ƥ���ꤷ���ΰ賰����������ΤϥХ��ǤϤʤ���. - - * �ե�����������Ƥ��ɤ��, �ƹԤ�����Ȥ����֤���åɤ�python�� - ���ͤˤ���`readlines'�Ȥ���̾���ˤ���. ����ˤȤ�ʤ�gets���Ф� - ��readline�Ȥ�����̾���Ѱդ���. - -Fri Jun 3 00:08:38 1994 Yukihiro Matsumoto (matz@dyna) - - * Array:sort - Ƚ�̴ؿ�������ͤ�Fixnum�ǤϤʤ�, Int�Ǥ���٤����� - ��. �ְ㤤. Sun��ư����������ä��ΤϤ��Τ��������Τ�ʤ�. - -Thu Jun 2 11:48:37 1994 Yukihiro Matsumoto (matz@ix-02) - - * IO:read_all() - ���ȥ��κǸ�ޤ����Ϥ���, �ƹԤ����ǤȤ����� - ����֤���åɤ��ɲ�. �ޤ��ؿ���å� read_all()���ɲä���. - ����ϰ����Υե����뤫���ɤ߹���dzƹԤ����ǤȤ���������֤�. �� - ̣Ū�ˤ� - - def read_all() - ary = {} - while gets() - ary.push($_) - end - end - - �Ȥۤ������Ǥ���. - - * String:atoi��åɤ���. to_a��åɤ���a������Ǥ���Ȥ�Ϣ�� - ��Ƥ��, ������ʤ�����. �����to_i��åɤ�Ȥ�����. - - * ����ؤ��Ѵ���å�to_a��Ƴ������. �̾�Υ��֥������Ȥϼ�ʬ���� - ��ͣ������ǤȤ���Ĺ��1��������֤�. ����ϼ�ʬ���Ȥ�, ����ϥ��� - ���ͤΥڥ���������֤�. Enumerated��include�������饹��, each�� - �֤������Ǥ�ޤ�������֤�. - - * file.c: ����Ĥΰ���������Ȥ��å�(chmod,chown,utimes)��� - ������, ��������. �����ȼ��, �ǽ�����Ƥΰ����η������å���Ԥ� - ���褦�ˤ���. �������å��˼��Ԥ���Ƚ�����Ԥʤ鷺���㳰��ȯ���� - ����. - - * configure.in: ��ɬ�פʥƥ��Ȥ�Ԥʤ�ʤ��褦�˽�������. - -Tue May 31 10:41:08 1994 Yukihiro Matsumoto (matz@ix-02) - - * String:pack(): 2�ʿ���ʸ�����Ѵ�(B,b)��0��1���դ��ä�. - - * Math.c: �¿��ϤΥ�åɤ˰����Ȥ����������Ϥ��줿���˼�ưŪ���� - ������褦�ˤ���. - - * toupper(), tolower(): ʸ�����Ƚ��ߥ����Ѵ�����Ƥ��ʤ��ä�. - - * getopt_long()�λ��ͤˤ�ä�, ������ץȤؤΰ��������ץ�� - �������Ȳ�ᤵ��Ƥ���. �����ѥ�����ʸ�������Ƭ��`+'���ɲ�. - - * config.h��������. DEFINE��Makefile��Ϳ������. - - * sprintf(): "%d"��ʸ����Ϳ����줿���ˤϥ��ɥ쥹�ǤϤʤ����Ƥ� - �������Ѵ�����褦�ˤ���. �Ĥ��Ǥ���ư�����������Ѵ�����褦���� - ������. - - * regexp.c: ruby�γ�ĥ����ɽ��(\d, \D, \s, \S)�ν����dz�����Ƥ��� - ���ۤ��ƥХåե��˽���Ǥ���. �������˥Хåե�����ȳ� - ĥ����褦�ˤ���. ����Ǻ�������ˤ��Ƥ������������ϲ��Ǥ� - ���Ȼפ�. - - * yylex(): ���֥륯������ʸ������ǥ��֥륯�����Ȥ�ɽ�����뤿�� - �ΥХå�����å���ɽ�����Ǥ��ʤ��ä�. - -Mon May 30 10:07:42 1994 Yukihiro Matsumoto (matz@ix-02) - - * �黻��`!'�α��դ��P�Ǥ���Ȥ���. ����ˤ�ä�, ���α黻�Ҥ� - ���������ͤϺ��𤹤뤫���Τ�ʤ���, ��¿���Τ��α黻�Ҥ�Ȥ��� - �Ϻ�����뤳�Ȥ��Ǥ���Ȼפ�. - - * autoconf��Ȥä�, ��ưŪ��Makefile, config.h����������褦�ˤ���. - �����, ¿���Υޥ���Ǥ�`configure'��¹Ԥ�����, `make'��ȯ�ǥ� - ��ѥ���Ǥ���Ȼפ�. - - * clone: ���֥��饹���Ф����Ѥ���줿���, ���Υ��֥������Ȥ�Ʊ�� - ���饹�Υ������֤��褦��(�����ϥӥ�ȥ��饹�ξ��� - �ͤ��Ƥʤ��ä�). - - * �ӥ�ȥ��饹�Υ��֥��饹�����褦��, ��ƥ��Τ��륯�饹 - �ˤ�new��åɤ��ɲä���. - - * malloc()�������. purify��ɬ�פ����Τ�ʤ�. - - * re.c: rb_global_variable()�θƤӤ��������δְ㤤. �ѿ��ؤΥݥ��� - �����Ϥ��ʤ���Ф����ʤ�. - - * parse.y: ���������ѿ��ΰ����˰�����ɾ����˰�¸����ܿ����Τʤ� - ��ʬ�����ä�. - - * attr(): °������ΥХ���ľ����. �����������ͤ��Ѥ�ä����������? - -Sat May 28 23:08:18 1994 Yukihiro Matsumoto (matz@dyna) - - * ����ɽ������å����ʸ�������Ƚ���ݥ����פ������ư��פ��� - ������. ����������ʸ�����ƥ��ϰ����˿��������֥������Ȥ��� - �������Τ��ä�. - -Fri May 27 11:42:00 1994 Yukihiro Matsumoto (matz@ix-02) - - * tr����ʸ�����(delete), ʸ������(squeeze)��ʬΥ����. ����ˤȤ� - �ʤ�tr�Υ��ץ��������Ϥʤ��ʤä�. - -Thu May 26 10:32:55 1994 Yukihiro Matsumoto (matz@ix-02) - - * ������ץ��ɤ߹��ߥ롼������ľ����, �̾�ե�����ʳ��Υե��� - ��̾���ʸ��������ץȤȤ���Ϳ����줿�����б�����. �ޤ�, - ɸ�����Ϥ��饹����ץȤ��ɤ߹������, ����ե����뤬/tmp�˻Ĥ�� - ���褦�ˤ���. - - * Fixnum:id2name - ID����ʸ������᤹�ؿ�. String:intern�ε�. - - * Array: ������ϰϳ������Ǥ��������������㳰��ȯ����������, - nil���֤��褦�ˤ���. ����ϼ�ưŪ�˳�ĥ�����. - - * string:strip���ɲ�. - - * -n���ץ����-e���ץ�����ʣ�����ꤷ������ư���褦��. - - * parse.y��<sys/types.h>�⥤�롼�ɤ���褦�ˤ���. - - * fname����κ٤���bug����. - -Wed May 26 11:45:10 1994 Yukihiro Matsumoto (matz@dyna) - - * �����å��夹��褦�ˤ���. �����֤���¿�����ˤ�ͭ���ΤϤ� - ����, ���٤��������������ʤ������٤��ʤ�ʤ�. - -Wed May 25 00:42:24 1994 Yukihiro Matsumoto (matz@dyna) - - * ¿������ʸ(foo, bar = 1, 2)�κ���. - - * ��P����ʸ���뤤������ɽ����ƥ�����`=~'�黻�Ҥˤ�� - ��`$_'����Ӥ����. ����`...'��ξ�դǤ�������ƥ�뤬`$.'����� - �����. - -Mon May 23 23:27:03 1994 Yukihiro Matsumoto (matz@dyna) - - * &�� �����Ϥʤ��ʤä�. �����kernel:apply(id, args..)��Ƴ��. - - * def op () ..������Ƴ��. op�Ϻ������ǽ�ʱ黻��. - - * constant�������������å�. ���˽��������Ƥ������������������� - ���㳰��ȯ������. - - * ¿������ʸ. - -Thu May 19 22:57:07 1994 Yukihiro Matsumoto (matz@dyna) - - * ʣ��ʸ�Ǥ�void value�Υ����å���Ԥ��褦�ˤ���. - - * until��ư��ν���(do..until�����ä�). - -Wed May 18 01:06:25 1994 Yukihiro Matsumoto (matz@dyna) - - * �ܿ��˴ؤ���㴳���������. - - * ��̾�ι�ʸ���def a b�פˤ���. - - * until/unless: �黻�Ҥ�������ʸ��. �㳰����ª���뵡ǽ�Ϥ��Τޤ�. - - * �����ǽ�ʵ�ǽ��config.h����defines.h�˰�ư. - -Fri May 13 23:20:21 1994 Yukihiro Matsumoto (matz@dyna) - - * -y���ץ�������. -d���ץ���饳��ѥ���ΥǥХå���ʬ��ʬ - Υ����. - -Tue Apr 25 20:17:33 1994 Yukihiro Matsumoto (matz@dyna) - - * �ޥ���Х���ʸ������̻Ҥ˻Ȥ���褦��. �Ŀ�Ū�ˤϻȤ�������̵ - �����ɤʤ�. - - * `-v'�ե饰�ξ��֤�$verbose�ǥ��������Ǥ���褦��. - - * CVS��Ƴ����ȼ��, �С�������������ˡ���ѹ�. - - * �����ܤ�ChangeLog��Ĥ�����ˤ���. - -Tue Mar 8 10:09:25 1994 Yukihiro Matsumoto (matz at nws119) - - * %�ѿ�̾ �ˤ�륯�饹�����Ƴ��. - - * undef ��å� �ˤ���å�����μ��ä���Ƴ��. - - * rb_get_method_body�Ǥ�the_env���ѹ�����, rb_call()������Ū���ѹ� - ����褦��. �����responds_to�ʤɤǴĶ����˲�����ʤ�. - -Mon Mar 7 17:46:15 1994 Yukihiro Matsumoto (matz at nws119) - - * ��&ʸ�������. �ּ�.ʸ������Υ�å���������ɤϤʤ��ʤä�. - - * ������������(+=. -=, ...) - - * obj.attr = expr�����κ���. - -Thu Feb 24 16:23:28 1994 Yukihiro Matsumoto (matz at nws119) - - * toint, tofloat, print_string�줾��to_i, to_f, to_s���ѹ�. - - * String:clone - Copy on Write�μ¸�. - -Tue Feb 22 11:11:44 1994 Yukihiro Matsumoto (matz at nws119) - - * re.c: �ޥå�����ʸ�������¸�˼��Ԥ��Ƥ���. - - * trap: ��ǽ�ʤ�н����˻��֤Τ����륷���ƥॳ����(read, wait, - sigpause, select)��եå����Ƴ����߽�����¨���������(DOS�� - �ɤǤ�̵�����ʤ�). - - * trap: �����ߤξ�ǽ������뤫(��®��������), �����ʥ����ߥ� - ���ǽ������뤫������Ǥ���褦��. - -Tue Feb 17 11:11:12 1994 Yukihiro Matsumoto (matz at nws119) - - * trap: �����ߥϥ�ɥ�. - -Wed Feb 16 12:29:12 1994 Yukihiro Matsumoto (matz at nws119) - - * String:crypt: �Ź沽�롼���� - - * "::"�黻�Ҥ��ɲ�. a::b �� {a, b}��Ʊ��. a::b::c �� {a, {b, c}}�� - Ʊ��(�����). Ʊ���ȤϤ�����Τ�, "::"�黻�Ҥ�Ȥä������������� - �����Ψ���ɤ�. - - * Dir.rmdir(), File.unlink(), File.utime() -- �ƥ����ƥॳ����ؤ� - ���ե�����. - - * kill -- kill(2) I/F - - * select(): read�Υ����å��Ǥ�stdio�˥Хåե������Ƥ��뤫�� - ����������å�����褦��. - -Tue Feb 15 15:08:31 1994 Yukihiro Matsumoto (matz at nws119) - - * file.c: stat��å��夹��褦��. - - * File:utime()���ɲ�. - - * unliteralize(): �ե饰���˲����Ƥ���. - - * Bug(): core���Ǥ��褦��. - - * String:tr -- tr(1)�ߴ�. �����ѥ�������äȰ㤦���ɡ�. - -Mon Feb 14 18:24:13 1994 Yukihiro Matsumoto (matz at nws119) - - * unless, until���㳰��ȸ��ʤ��褦��. - - * select() -- select(2) I/F - - * Array:pack, String:unpack: perl��pack/unpack��Ʊ���� - -Tue Feb 8 17:11:10 1994 Yukihiro Matsumoto (matz at nws119) - - * setenv()�Τʤ������ƥ�Τ����putenv()��Ȥä������ɤ��Ѱդ���. - -Mon Feb 7 09:52:44 1994 Yukihiro Matsumoto (matz at nws119) - - * �����ΰ��ֺǸ��`*'���֤���褦�ˤ���. �����rest�����Υꥹ�Ȥ� - ����ɬ�פ����ʤ��ʤ�. - -Fri Feb 4 18:23:26 1994 Yukihiro Matsumoto (matz at nws119) - - * ruby-mode.el���ľ��. �����֤�ޤ��ˤʤä��Ȼפ�. - - * ʸ�����ƥ���Copy on Write��¸�. �����ʸ����ƥ��Ǥ� - �뤫��Ȥ��äƤ�������clone���ʤ��Ƥ�Ѥ�. - -Tue Feb 1 09:21:09 1994 Yukihiro Matsumoto (matz at nws119) - - * sub(), gsub()��, �ޥå�����ʸ�����$&, $1..$9�ǥ��������Ǥ���� - ���ˤ���. Ʊ���˥ޥå�������ʬʸ����ԡ����Ƥ����褦��(���� - ʸ�����ѹ�����Ƥ���֤���¸���뤿��). - -Mon Jan 31 15:16:58 1994 Yukihiro Matsumoto (matz at nws119) - - * �ץ饤�١��ȥ�åɤλ��ͤ��ѹ�. ���ޤǤ�Ʊ�����饹�Υ�åɤ� - �餷�����������Ǥ��ʤ��ä���, ���֥��饹�Υ�åɤ���⥢������ - �Ǥ���褦�ˤ���(C++�ˤ�����protected ���дؿ�). - - * ��åɥ������Υ��르�ꥺ��������, 10%���٤ι�®����Ԥʤä�. - - * ��®��. C�ǵ��Ҥ��줿��åɤ�ƤӽФ����ˤ�setjmp��ƤФʤ��� - ���ˤ���. �����C��åɤ�¿�Ѥ�����ˤ�3�����ٹ�®�ˤʤä�. - -Fri Jan 28 15:44:04 1994 Yukihiro Matsumoto (matz at nws119) - - * sh-mode��ruby-mode.el����. �黻�Ҥǽ���, 2�Ԥ��Ϥ�ʸ�ˤ��� - �����Ƥ��ʤ����ɡ�. - -Thu Jan 27 11:35:19 1994 Yukihiro Matsumoto (matz at nws119) - - * freenode(): NODE_NIL�β���˺��. - - * ����������ΥХ�����(�����Ȥθ�ξ��֤��ᤷ˺��). - - * protect .. end�ΥХ�����. GC_LINK�Υͥ��Ȥ��������ä�. - - * join�ΥХ�����(�ȤäƤ��륪�֥������Ȥ�free���Ƥ���). - - * split�ΥХ�����(���르�ꥺ�ब���������ä�). - - * fork()���ɲ�. - -Wed Jan 26 17:09:56 1994 Yukihiro Matsumoto (matz at nws119) - - * �ե�����ƥ��ȥ�åɤ��ɲ�. - - * rb_autoexec(): ���饹����ƥ��������������ε�ư������Ǥ���� - ���ˤ���. �����autoload��¸��Ǥ���. ����ˤȤ�ʤ���å� - unknown�Ϥʤ��ʤä�. - -Tue Jan 25 15:51:36 1994 Yukihiro Matsumoto (matz at nws119) - - * Dbm���饹, Math�⥸�塼������. - - * -I���ץ����ǥ������ѥ����ɲäǤ���褦��. - - * �������ѥ����ѿ�$load_path������Ǥ���褦��. - - * load(): �����ʥߥå������ɤ�Ȥ���褦�ˤ���. - -Tue Jan 18 14:14:01 1994 Yukihiro Matsumoto (matz at nws119) - - * Comparable:"<=>" - - * Float,Fixnum:"**" - - * Array:sort - -Fri Jan 14 16:53:37 1994 Yukihiro Matsumoto (matz at nws119) - - * version 0.07 - - * ��åɤ˴ؤ���ɥ�����Ȥ¤�����. - - * String:index(): ����position�����䤷��. - -Thu Jan 13 15:13:52 1994 Yukihiro Matsumoto (matz at nws119) - - * ̤��������ѿ�����������ʤ�����. - - * ̵�̤�hash table�Υ���������������. - - * Purify'd(on Sun) - - * ~RE �� ~STR�Υ���ѥ����Ÿ��������. - - * Sun�ذܿ�. signal()�������. RData��bug����. - - * parse.y: nls�롼�����. - - * yylex(): ���Ԥ����β�����ʬ���ѹ�. - - * missing/strftime.c: �ܿ���. - - * Time:strftime: ����¾�Υ�åɤ�strftime�����Ѥ���褦��. - - * ��åɺ�������˥�åɥ���å���ꥢ����. - -Fri Jan 7 15:23:20 1994 Yukihiro Matsumoto (matz at nws119) - - * Float:coerce(): Fixnum��Float�ʳ��ΰ�����Ϳ�����뤿���ˤ��㳰 - ��ȯ������褦��. - - * Stat: stat��¤�Τ����ƤΥ��Ф��Ф��륢��������åɤ��Ѱ�. - - * ̤����Υ��饹/�⥸�塼��ؤλ��Ȥ�unknown��åɤ�ƤӽФ��褦 - �ˤ���. - - * baseline - version 0.06. diff --git a/Makefile b/Makefile deleted file mode 100644 index 0908d49776..0000000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# -# Makefile - -# -# created at: Wed Aug 10 15:21:29 JST 1994 - -all:; @echo "You must run configure first." diff --git a/Makefile.in b/Makefile.in index 6296a5e650..3a88a991be 100644 --- a/Makefile.in +++ b/Makefile.in @@ -6,31 +6,28 @@ srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ -DBM = @DBM@ +DBMCC = cc YACC = @YACC@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ -MAKEINFO = makeinfo CFLAGS = -g LDFLAGS = @STATIC@ $(CFLAGS) LIBS = @LIBS@ DEFS = @DEFS@ +MISSING = @LIBOBJS@ prefix = /usr/local binprefix = exec_prefix = $(prefix) bindir = $(exec_prefix)/bin -infodir = $(prefix)/info #### End of system configuration section. #### -.c.o: - $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) -I$(srcdir)/lib $< - HDRS = defines.h \ dln.h \ + getopt.h \ ident.h \ io.h \ node.h \ @@ -40,47 +37,6 @@ HDRS = defines.h \ st.h \ version.h -SRCS = array.c \ - bignum.c \ - class.c \ - compar.c \ - dbm.c \ - dict.c \ - dir.c \ - dln.c \ - enum.c \ - error.c \ - etc.c \ - eval.c \ - file.c \ - fnmatch.c \ - gc.c \ - glob.c \ - gnuglob.c \ - inits.c \ - io.c \ - main.c \ - math.c \ - missing.c \ - numeric.c \ - object.c \ - pack.c \ - parse.y \ - process.c \ - random.c \ - range.c \ - re.c \ - regex.c \ - ruby.c \ - socket.c \ - sprintf.c \ - st.c \ - string.c \ - struct.c \ - time.c \ - variable.c \ - version.c - OBJS = array.o \ bignum.o \ class.o \ @@ -96,13 +52,14 @@ OBJS = array.o \ file.o \ fnmatch.o \ gc.o \ + getopt.o \ + getopt1.o \ glob.o \ gnuglob.o \ inits.o \ io.o \ main.o \ math.o \ - missing.o \ numeric.o \ object.o \ pack.o \ @@ -120,11 +77,9 @@ OBJS = array.o \ struct.o \ time.o \ variable.o \ - version.o - -DISTFILES = README NEWS TODO THANKS COPYING INSTALL \ -ChangeLog Makefile.in configure.in \ -$(HDRS) $(SRCS) configure + version.o \ + $(MISSING) \ + @ALLOCA@ PROGRAM = ruby @@ -140,56 +95,80 @@ $(bindir)/$(PROGRAM): $(PROGRAM) install: $(bindir)/$(PROGRAM) clean:; @rm -f $(OBJS) - -realclean:; @rm -f $(OBJS) @rm -f core ruby *~ config.status Makefile +.c.o: + $(CC) $(CFLAGS) $(CPPFLAGS) -c $< dbm.o:dbm.c - $(CC) -c $(DBM) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I$(srcdir) -I$(srcdir)/lib dbm.c + $(DBMCC) $(CFLAGS) $(CPPFLAGS) -c dbm.c + +alloca.o: missing/alloca.c + $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/alloca.c + +memmove.o: missing/memmove.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/memmove.c + +mkdir.o: missing/mkdir.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/mkdir.c + +strerror.o: missing/strerror.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strerror.c + +strdup.o: missing/strdup.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strdup.c + +strftime.o: missing/strftime.c + $(CC) -I. $(CFLAGS) $(CPPFLAGS) -c missing/strftime.c + +strstr.o: missing/strstr.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strstr.c + +strtol.o: missing/strtol.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtol.c + +strtoul.o: missing/strtoul.c + $(CC) $(CFLAGS) $(CPPFLAGS) -c missing/strtoul.c # Prevent GNU make v3 from overflowing arg limit on SysV. .NOEXPORT: ### -parse.o : parse.y ruby.h defines.h env.h node.h st.h ident.h regex.h +parse.o : parse.y ruby.h defines.h config.h env.h node.h st.h ident.h regex.h ### -array.o : array.c ruby.h defines.h -bignum.o : bignum.c ruby.h defines.h -class.o : class.c ruby.h defines.h env.h node.h st.h -compar.o : compar.c ruby.h defines.h -dbm.o : dbm.c ruby.h defines.h -dict.o : dict.c ruby.h defines.h st.h -dir.o : dir.c ruby.h defines.h -dln.o : dln.c defines.h dln.h -enum.o : enum.c ruby.h defines.h -error.o : error.c ruby.h defines.h env.h -etc.o : etc.c ruby.h defines.h -eval.o : eval.c ruby.h defines.h ident.h env.h node.h st.h -file.o : file.c ruby.h defines.h io.h -fnmatch.o : fnmatch.c fnmatch.h -gc.o : gc.c ruby.h defines.h env.h st.h -glob.o : glob.c ruby.h defines.h fnmatch.h -gnuglob.o : gnuglob.c fnmatch.h -inits.o : inits.c ruby.h defines.h -io.o : io.c ruby.h defines.h io.h -main.o : main.c -math.o : math.c ruby.h defines.h -missing.o : missing.c ruby.h defines.h missing/memmove.c missing/strerror.c \ - missing/strtoul.c missing/strftime.c missing/strstr.c missing/getopt.h missing/getopt.c \ - missing/getopt1.c missing/mkdir.c -numeric.o : numeric.c ruby.h defines.h -object.o : object.c ruby.h defines.h env.h node.h st.h -pack.o : pack.c ruby.h defines.h -process.o : process.c ruby.h defines.h st.h -random.o : random.c ruby.h defines.h -range.o : range.c ruby.h defines.h -re.o : re.c ruby.h defines.h re.h regex.h -regex.o : regex.c defines.h regex.h -ruby.o : ruby.c ruby.h defines.h re.h regex.h missing/getopt.h -socket.o : socket.c ruby.h defines.h -sprintf.o : sprintf.c ruby.h defines.h -st.o : st.c st.h -string.o : string.c ruby.h defines.h re.h regex.h -struct.o : struct.c ruby.h defines.h env.h -time.o : time.c ruby.h defines.h -variable.o : variable.c ruby.h defines.h env.h node.h ident.h st.h -version.o : version.c ruby.h defines.h version.h +array.o: array.c ruby.h config.h defines.h +bignum.o: bignum.c ruby.h config.h defines.h +class.o: class.c ruby.h config.h defines.h env.h node.h st.h +compar.o: compar.c ruby.h config.h defines.h +dbm.o: dbm.c ruby.h config.h defines.h +dict.o: dict.c ruby.h config.h defines.h st.h +dir.o: dir.c ruby.h config.h defines.h +dln.o: dln.c defines.h dln.h +enum.o: enum.c ruby.h config.h defines.h +error.o: error.c ruby.h config.h defines.h env.h +etc.o: etc.c ruby.h config.h defines.h +eval.o: eval.c ruby.h config.h defines.h ident.h env.h node.h st.h +file.o: file.c ruby.h config.h defines.h io.h +fnmatch.o: fnmatch.c fnmatch.h +gc.o: gc.c ruby.h config.h defines.h env.h st.h +glob.o: glob.c ruby.h config.h defines.h fnmatch.h +gnuglob.o: gnuglob.c fnmatch.h +inits.o: inits.c ruby.h config.h defines.h +io.o: io.c ruby.h config.h defines.h io.h +main.o: main.c +math.o: math.c ruby.h config.h defines.h +numeric.o: numeric.c ruby.h config.h defines.h env.h +object.o: object.c ruby.h config.h defines.h env.h node.h st.h +pack.o: pack.c ruby.h config.h defines.h +process.o: process.c ruby.h config.h defines.h st.h +random.o: random.c ruby.h config.h defines.h +range.o: range.c ruby.h config.h defines.h +re.o: re.c ruby.h config.h defines.h re.h regex.h +regex.o: regex.c defines.h regex.h +ruby.o: ruby.c ruby.h config.h defines.h re.h regex.h getopt.h +socket.o: socket.c ruby.h config.h defines.h io.h +sprintf.o: sprintf.c ruby.h config.h defines.h +st.o: st.c st.h +string.o: string.c ruby.h config.h defines.h re.h regex.h +struct.o: struct.c ruby.h config.h defines.h env.h +time.o: time.c ruby.h config.h defines.h +variable.o: variable.c ruby.h config.h defines.h env.h node.h ident.h st.h +version.o: version.c ruby.h config.h defines.h version.h @@ -1,4 +1,7 @@ -* tr����BSD�����ɤ������ +* format��ǽ +* here document +* perl�Τ褦��setuid check +* tr����BSD�����ɤ������(�ޤ���copyright��Ϥä��ꤵ����) * Ŭ�ڤ�signal handling * dln��COFF�б� * ruby����������ѿ�hook�μ¸� @@ -3,7 +3,7 @@ array.c - $Author: matz $ - $Date: 1994/11/22 01:22:30 $ + $Date: 1994/12/06 09:29:47 $ created at: Fri Aug 6 09:46:12 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -94,7 +94,7 @@ assoc_new(elm1, elm2) } static VALUE -Fary_new(class) +Sary_new(class) VALUE class; { NEWOBJ(ary, struct RArray); @@ -132,7 +132,7 @@ astore(ary, idx, val) } VALUE -Fary_push(ary, item) +ary_push(ary, item) struct RArray *ary; VALUE item; { @@ -150,7 +150,7 @@ Fary_append(ary, item) } VALUE -Fary_pop(ary) +ary_pop(ary) struct RArray *ary; { if (ary->len == 0) return Qnil; @@ -158,7 +158,7 @@ Fary_pop(ary) } VALUE -Fary_shift(ary) +ary_shift(ary) struct RArray *ary; { VALUE top; @@ -175,7 +175,7 @@ Fary_shift(ary) } VALUE -Fary_unshift(ary, item) +ary_unshift(ary, item) struct RArray *ary; { VALUE top; @@ -474,7 +474,7 @@ Fary_length(ary) } static VALUE -Fary_clone(ary) +ary_clone(ary) struct RArray *ary; { VALUE ary2 = ary_new2(ary->len); @@ -497,16 +497,14 @@ ary_join(ary, sep) if (ary->len == 0) return str_new(0, 0); if (TYPE(ary->ptr[0]) == T_STRING) - result = Fstr_clone(ary->ptr[0]); + result = str_clone(ary->ptr[0]); else result = obj_as_string(ary->ptr[0]); for (i=1; i<ary->len; i++) { - int need_free = 1; tmp = ary->ptr[i]; switch (TYPE(tmp)) { case T_STRING: - need_free = 0; break; case T_ARRAY: tmp = ary_join(tmp, sep); @@ -516,7 +514,6 @@ ary_join(ary, sep) } if (sep) str_cat(result, sep->ptr, sep->len); str_cat(result, RSTRING(tmp)->ptr, RSTRING(tmp)->len); - if (need_free == 1) obj_free(tmp); } return result; @@ -547,7 +544,7 @@ Fary_to_s(ary) return str; } -static VALUE +VALUE Fary_print_on(ary, port) struct RArray *ary; VALUE port; @@ -556,9 +553,9 @@ Fary_print_on(ary, port) for (i=0; i<ary->len; i++) { if (OFS && i>1) { - Fio_write(port, OFS); + io_write(port, OFS); } - Fio_write(port, ary->ptr[i]); + io_write(port, ary->ptr[i]); } return port; } @@ -573,7 +570,7 @@ Fary_inspect(ary) VALUE str; char *p; - ary = (struct RArray*)Fary_clone(ary); + ary = (struct RArray*)ary_clone(ary); len = ary->len; for (i=0; i<len; i++) { @@ -766,8 +763,8 @@ Fary_plus(x, y) break; default: - z = (struct RArray*)Fary_clone(x); - Fary_push(z, y); + z = (struct RArray*)ary_clone(x); + ary_push(z, y); break; } return (VALUE)z; @@ -856,18 +853,18 @@ Fary_hash(ary) return INT2FIX(h); } -static int -ary_contains(ary, item) +static VALUE +Fary_includes(ary, item) struct RArray *ary; VALUE item; { int i; for (i=0; i<ary->len; i++) { if (rb_funcall(ary->ptr[i], eq, 1, item)) { - return 1; + return TRUE; } } - return 0; + return FALSE; } static VALUE @@ -880,9 +877,9 @@ Fary_diff(ary1, ary2) Check_Type(ary2, T_ARRAY); ary3 = ary_new(); for (i=0; i<ary1->len; i++) { - if (ary_contains(ary2, ary1->ptr[i])) continue; - if (ary_contains(ary3, ary1->ptr[i])) continue; - Fary_push(ary3, ary1->ptr[i]); + if (Fary_includes(ary2, ary1->ptr[i])) continue; + if (Fary_includes(ary3, ary1->ptr[i])) continue; + ary_push(ary3, ary1->ptr[i]); } return ary3; } @@ -897,9 +894,9 @@ Fary_and(ary1, ary2) Check_Type(ary2, T_ARRAY); ary3 = ary_new(); for (i=0; i<ary1->len; i++) { - if (ary_contains(ary2, ary1->ptr[i]) - && !ary_contains(ary3, ary1->ptr[i])) { - Fary_push(ary3, ary1->ptr[i]); + if (Fary_includes(ary2, ary1->ptr[i]) + && !Fary_includes(ary3, ary1->ptr[i])) { + ary_push(ary3, ary1->ptr[i]); } } return ary3; @@ -912,16 +909,19 @@ Fary_or(ary1, ary2) VALUE ary3; int i; - if (TYPE(ary2) != T_ARRAY) return Fary_plus(ary1, ary2); + if (TYPE(ary2) != T_ARRAY) { + if (Fary_includes(ary1, ary2)) return (VALUE)ary1; + else return Fary_plus(ary1, ary2); + } ary3 = ary_new(); for (i=0; i<ary1->len; i++) { - if (!ary_contains(ary3, ary1->ptr[i])) - Fary_push(ary3, ary1->ptr[i]); + if (!Fary_includes(ary3, ary1->ptr[i])) + ary_push(ary3, ary1->ptr[i]); } for (i=0; i<ary2->len; i++) { - if (!ary_contains(ary3, ary2->ptr[i])) - Fary_push(ary3, ary2->ptr[i]); + if (!Fary_includes(ary3, ary2->ptr[i])) + ary_push(ary3, ary2->ptr[i]); } return ary3; } @@ -934,7 +934,7 @@ Init_Array() C_Array = rb_define_class("Array", C_Object); rb_include_module(C_Array, M_Enumerable); - rb_define_single_method(C_Array, "new", Fary_new, 0); + rb_define_single_method(C_Array, "new", Sary_new, 0); rb_define_method(C_Array, "to_s", Fary_to_s, 0); rb_define_method(C_Array, "_inspect", Fary_inspect, 0); rb_define_method(C_Array, "to_a", Fary_to_a, 0); @@ -946,17 +946,17 @@ Init_Array() rb_define_method(C_Array, "[]", Fary_aref, -2); rb_define_method(C_Array, "[]=", Fary_aset, -2); rb_define_method(C_Array, "<<", Fary_append, 1); - rb_define_method(C_Array, "push", Fary_push, 1); - rb_define_method(C_Array, "pop", Fary_pop, 0); - rb_define_method(C_Array, "shift", Fary_shift, 0); - rb_define_method(C_Array, "unshift", Fary_unshift, 1); + rb_define_method(C_Array, "push", ary_push, 1); + rb_define_method(C_Array, "pop", ary_pop, 0); + rb_define_method(C_Array, "shift", ary_shift, 0); + rb_define_method(C_Array, "unshift", ary_unshift, 1); rb_define_method(C_Array, "each", Fary_each, 0); rb_define_method(C_Array, "each_index", Fary_each_index, 0); rb_define_method(C_Array, "length", Fary_length, 0); rb_define_alias(C_Array, "size", "length"); rb_define_method(C_Array, "index", Fary_index, 1); rb_define_method(C_Array, "indexes", Fary_indexes, -2); - rb_define_method(C_Array, "clone", Fary_clone, 0); + rb_define_method(C_Array, "clone", ary_clone, 0); rb_define_method(C_Array, "join", Fary_join, -2); rb_define_method(C_Array, "reverse", Fary_reverse, 0); rb_define_method(C_Array, "sort", Fary_sort, 0); @@ -964,6 +964,7 @@ Init_Array() rb_define_method(C_Array, "delete_if", Fary_delete_if, 0); rb_define_method(C_Array, "clear", Fary_clear, 0); rb_define_method(C_Array, "fill", Fary_fill, -2); + rb_define_method(C_Array, "includes", Fary_includes, 1); rb_define_method(C_Array, "assoc", Fary_assoc, 1); rb_define_method(C_Array, "rassoc", Fary_rassoc, 1); @@ -3,7 +3,7 @@ bignum.c - $Author: matz $ - $Date: 1994/11/01 08:27:46 $ + $Date: 1994/12/06 09:29:49 $ created at: Fri Jun 10 00:48:55 JST 1994 ************************************************/ @@ -44,7 +44,7 @@ bignew_1(class, len, sign) #define bignew(len,sign) bignew_1(C_Bignum,len,sign) static VALUE -Fbig_new(class, y) +Sbig_new(class, y) VALUE class; struct RBignum *y; { @@ -53,7 +53,7 @@ Fbig_new(class, y) } VALUE -Fbig_clone(x) +big_clone(x) struct RBignum *x; { VALUE z = bignew_1(CLASS_OF(x), x->len, x->sign); @@ -286,7 +286,7 @@ big2str(x, base) Fail("bignum cannot treat base %d", base); } - t = Fbig_clone(x); + t = big_clone(x); ds = BDIGITS(t); ss = str_new(0, j); s = RSTRING(ss)->ptr; @@ -406,7 +406,7 @@ static VALUE Fbig_uminus(x) struct RBignum *x; { - VALUE z = Fbig_clone(x); + VALUE z = big_clone(x); RBIGNUM(z)->sign = !x->sign; @@ -572,7 +572,7 @@ bigdivmod(x, y, div, mod) xds = BDIGITS(x); if (ny == 1) { dd = yds[0]; - z = Fbig_clone(x); + z = big_clone(x); zds = BDIGITS(z); t2 = 0; i = nx; while(i--) { @@ -592,7 +592,7 @@ bigdivmod(x, y, div, mod) if (nx==ny) zds[nx+1] = 0; while (!yds[ny-1]) ny--; if ((dd = BIGRAD/(yds[ny-1]+1)) != 1) { - y = (struct RBignum*)Fbig_clone(y); + y = (struct RBignum*)big_clone(y); tds = BDIGITS(y); j = 0; num = 0; @@ -649,7 +649,7 @@ bigdivmod(x, y, div, mod) zds[j] = q; } while (--j >= ny); if (div) { /* move quotient down in z */ - *div = Fbig_clone(z); + *div = big_clone(z); zds = BDIGITS(*div); j = (nx==ny ? nx+2 : nx+1) - ny; for (i = 0;i < j;i++) zds[i] = zds[i+ny]; @@ -657,7 +657,7 @@ bigdivmod(x, y, div, mod) *div = bignorm(*div); } if (mod) { /* just normalize remainder */ - *mod = Fbig_clone(z); + *mod = big_clone(z); if (dd) { zds = BDIGITS(*mod); t2 = 0; i = ny; @@ -763,11 +763,11 @@ Fbig_and(x, y) } if (!y->sign) { - y = (struct RBignum*)Fbig_clone(y); + y = (struct RBignum*)big_clone(y); big_2comp(y); } if (!x->sign) { - x = (struct RBignum*)Fbig_clone(x); + x = (struct RBignum*)big_clone(x); big_2comp(x); } if (x->len > y->len) { @@ -814,11 +814,11 @@ Fbig_or(x, y) } if (!y->sign) { - y = (struct RBignum*)Fbig_clone(y); + y = (struct RBignum*)big_clone(y); big_2comp(y); } if (!x->sign) { - x = (struct RBignum*)Fbig_clone(x); + x = (struct RBignum*)big_clone(x); big_2comp(x); } if (x->len > y->len) { @@ -866,11 +866,11 @@ Fbig_xor(x, y) } if (!y->sign) { - y = (struct RBignum*)Fbig_clone(y); + y = (struct RBignum*)big_clone(y); big_2comp(y); } if (!x->sign) { - x = (struct RBignum*)Fbig_clone(x); + x = (struct RBignum*)big_clone(x); big_2comp(x); } if (x->len > y->len) { @@ -907,7 +907,7 @@ static VALUE Fbig_neg(x) struct RBignum *x; { - VALUE z = Fbig_clone(x); + VALUE z = big_clone(x); UINT i = x->len; USHORT *ds = BDIGITS(z); @@ -998,7 +998,7 @@ Fbig_aref(x, y) if (!x->sign) { if (s1 >= x->len) return INT2FIX(1); - x = (struct RBignum*)Fbig_clone(x); + x = (struct RBignum*)big_clone(x); big_2comp(x); } else { @@ -1065,7 +1065,7 @@ Fbig_abs(x) struct RBignum *x; { if (!x->sign) { - x = (struct RBignum*)Fbig_clone(x); + x = (struct RBignum*)big_clone(x); x->sign = 1; } return (VALUE)x; @@ -1074,7 +1074,7 @@ Fbig_abs(x) Init_Bignum() { C_Bignum = rb_define_class("Bignum", C_Integer); - rb_define_single_method(C_Bignum, "new", Fbig_new, 1); + rb_define_single_method(C_Bignum, "new", Sbig_new, 1); rb_define_method(C_Bignum, "to_s", Fbig_to_s, 0); rb_define_method(C_Bignum, "coerce", Fbig_coerce, 1); diff --git a/bring b/bring deleted file mode 100644 index 771cd04542..0000000000 --- a/bring +++ /dev/null @@ -1,57 +0,0 @@ -#! /usr/bin/bash - -function fdeject() { - if type eject > /dev/null 2>&1; then - eject - fi -} - -function copyfiles() { - for d in . missing sample; do - if [ ! -d $1/$d ];then mkdir $1/$d; fi - for i in $d/*;do - case $i in - */ruby|*.o|*~|*.sav|*.bak|*.orig|*/core|"#"*);; - */Change*|*/config.status|*/Makefile);; - *) - if [ -f $i ]; then - if [ $i -nt $1/$i -o ! -f $1/$i ];then - echo copying $i - cp -p $i $1/$i - fi - fi;; - esac - done - done -} - -if [ ! -d exchange ]; then mkdir exchange; fi - -if [ "$1" = "in" ]; then - - cd exchange - - mread ruby.tgz ruby.tgz - fdeject - tar zxf ruby.tgz - rm -f ruby.tgz - cd ruby - - cp ChangeLog ../../Changes - copyfiles ../.. - -else -# bring out - if [ ! -d exchange/ruby ]; then mkdir exchange/ruby; fi - - cp -p ChangeLog exchange/ruby - copyfiles exchange/ruby - - cd exchange - (cd ruby; make realclean) - - tar zcf ruby.tgz ruby - mwrite ruby.tgz ruby.tgz - fdeject - rm -f ruby.tgz -fi diff --git a/config.status b/config.status deleted file mode 100755 index 7bdc7b26ed..0000000000 --- a/config.status +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh -# Generated automatically by configure. -# Run this file to recreate the current configuration. -# This directory was configured as follows, -# on host dyna: -# -# ./configure - -for arg -do - case "$arg" in - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo running ${CONFIG_SHELL-/bin/sh} ./configure - exec ${CONFIG_SHELL-/bin/sh} ./configure ;; - *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;; - esac -done - -trap 'rm -f Makefile; exit 1' 1 3 15 -PROGS='ruby' -CC='gcc' -CPP='gcc -E' -DBM='-fpcc-struct-return' -STATIC='' -YACC='bison -y' -INSTALL='/usr/bin/install -c' -INSTALL_PROGRAM='$(INSTALL)' -INSTALL_DATA='$(INSTALL) -m 644' -ALLOCA='' -LIBS=' -lm -ldbm' -srcdir='.' -DEFS=' -DHAVE_UNISTD_H=1 -DHAVE_SYSCALL_H=1 -DHAVE_A_OUT_H=1 -DDIRENT=1 -DGETGROUPS_T=gid_t -DRETSIGTYPE=void -DHAVE_GETOPT_LONG=1 -DHAVE_MEMMOVE=1 -DHAVE_STRERROR=1 -DHAVE_STRTOL=1 -DHAVE_STRTOUL=1 -DHAVE_STRDUP=1 -DHAVE_SETENV=1 -DHAVE_KILLPG=1 -DHAVE_MKDIR=1 -DHAVE_STRFTIME=1 -DHAVE_ALLOCA_H=1' -prefix='' -exec_prefix='' -prsub='' -extrasub='' - -top_srcdir=$srcdir - -CONFIG_FILES=${CONFIG_FILES-"Makefile"} -for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then - srcdir=$top_srcdir - # Remove last slash and all that follows it. Not all systems have dirname. - dir=`echo $file|sed 's%/[^/][^/]*$%%'` - if test "$dir" != "$file"; then - test "$top_srcdir" != . && srcdir=$top_srcdir/$dir - test ! -d $dir && mkdir $dir - fi - echo creating $file - rm -f $file - echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file - sed -e " -$prsub -$extrasub -s%@PROGS@%$PROGS%g -s%@CC@%$CC%g -s%@CPP@%$CPP%g -s%@DBM@%$DBM%g -s%@STATIC@%$STATIC%g -s%@YACC@%$YACC%g -s%@INSTALL@%$INSTALL%g -s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g -s%@INSTALL_DATA@%$INSTALL_DATA%g -s%@ALLOCA@%$ALLOCA%g -s%@LIBS@%$LIBS%g -s%@srcdir@%$srcdir%g -s%@DEFS@%$DEFS% -" $top_srcdir/${file}.in >> $file -fi; done - - -exit 0 diff --git a/configure.in b/configure.in index bd841c434c..9eec8ad999 100644 --- a/configure.in +++ b/configure.in @@ -4,10 +4,6 @@ PROGS="ruby" AC_SUBST(PROGS)dnl AC_PROG_CC AC_GCC_TRADITIONAL -if test "$GCC" = 1 ; then - DBM=-fpcc-struct-return -fi -AC_SUBST(DBM)dnl if test "$HOSTTYPE" = sparc; then if test "$GCC" = 1 ; then STATIC=-static @@ -24,22 +20,23 @@ AC_HAVE_HEADERS(unistd.h syscall.h a.out.h) AC_DIR_HEADER AC_GETGROUPS_T AC_RETSIGTYPE -AC_HAVE_FUNCS(getopt_long memmove strerror strtoul strdup strstr) -AC_HAVE_FUNCS(setenv fmod killpg mkdir strftime socket random) +AC_REPLACE_FUNCS(memmove mkdir strerror strftime) +AC_REPLACE_FUNCS(strstr strtol strtoul strdup) +AC_HAVE_FUNCS(fmod killpg socket random) AC_HAVE_FUNCS(wait4 waitpid syscall getcwd) +AC_HAVE_FUNCS(setruid seteuid setreuid) +AC_HAVE_FUNCS(setrgid setegid setregid) AC_HAVE_FUNCS(getpriority sigprocmask) -if echo $DEFS | grep "HAVE_SETENV" 2>&1 > /dev/null; then - : -else - AC_HAVE_FUNCS(putenv) -fi -if echo $DEFS | grep "HAVE_STRFTIME" 2>&1 > /dev/null; then - : -else - AC_TIMEZONE - AC_COMPILE_CHECK([daylight], [], - [extern int daylight; int i = daylight;], AC_DEFINE(HAVE_DAYLIGHT)) -fi +AC_FUNC_CHECK(setenv, [], AC_HAVE_FUNCS(putenv)) + +case "$LIBOBJS" in + *) ;; + *strftime*) + AC_TIMEZONE + AC_COMPILE_CHECK([daylight], [], + [extern int daylight; int i = daylight;], AC_DEFINE(HAVE_DAYLIGHT));; +esac + AC_ALLOCA AC_WORDS_BIGENDIAN AC_ST_BLKSIZE @@ -63,3 +60,4 @@ AC_HAVE_LIBRARY(m, [LIBS="$LIBS -lm"]) AC_HAVE_LIBRARY(dbm, [LIBS="$LIBS -ldbm"]) AC_HAVE_LIBRARY(socket, [LIBS="$LIBS -lsocket"]) AC_OUTPUT(Makefile) +mv confdefs.h config.h @@ -3,7 +3,7 @@ dbm.c - $Author: matz $ - $Date: 1994/10/14 10:00:51 $ + $Date: 1994/12/06 09:29:52 $ created at: Mon Jan 24 15:59:52 JST 1994 Copyright (C) 1994 Yukihiro Matsumoto @@ -50,7 +50,7 @@ free_dbm(dbmp) } static VALUE -Fdbm_open(class, args) +Sdbm_open(class, args) VALUE class, args; { VALUE file, vmode; @@ -302,7 +302,7 @@ Fdbm_keys(obj) ary = ary_new(); GetDBM(obj, dbm); for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { - Fary_push(ary, str_new(key.dptr, key.dsize)); + ary_push(ary, str_new(key.dptr, key.dsize)); } return ary; @@ -320,7 +320,7 @@ Fdbm_values(obj) GetDBM(obj, dbm); for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { val = dbm_fetch(dbm, key); - Fary_push(ary, str_new(val.dptr, val.dsize)); + ary_push(ary, str_new(val.dptr, val.dsize)); } return ary; @@ -377,8 +377,8 @@ Fdbm_to_a(obj) ary = ary_new(); for (key = dbm_firstkey(dbm); key.dptr; key = dbm_nextkey(dbm)) { val = dbm_fetch(dbm, key); - Fary_push(ary, assoc_new(str_new(key.dptr, key.dsize), - str_new(val.dptr, val.dsize))); + ary_push(ary, assoc_new(str_new(key.dptr, key.dsize), + str_new(val.dptr, val.dsize))); } return ary; @@ -389,7 +389,7 @@ Init_DBM() C_DBM = rb_define_class("DBM", C_Object); rb_include_module(C_DBM, M_Enumerable); - rb_define_single_method(C_DBM, "open", Fdbm_open, -2); + rb_define_single_method(C_DBM, "open", Sdbm_open, -2); rb_define_method(C_DBM, "close", Fdbm_close, 0); rb_define_method(C_DBM, "[]", Fdbm_fetch, 1); rb_define_method(C_DBM, "[]=", Fdbm_store, 2); @@ -16,9 +16,9 @@ #define EUC #undef SJIS -/* define USE_DLN to load object file(.o). */ #ifdef HAVE_A_OUT_H +/* define USE_DLN to load object file(.o). */ #define USE_DLN #ifdef USE_DLN #define LIBC_NAME "libc.a" @@ -3,7 +3,7 @@ dict.c - $Author: matz $ - $Date: 1994/11/01 08:27:49 $ + $Date: 1994/12/06 09:29:53 $ created at: Mon Nov 22 18:51:18 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -37,8 +37,8 @@ rb_hash(a, mod) #define ASSOC_KEY(a) RARRAY(a)->ptr[0] #define ASSOC_VAL(a) RARRAY(a)->ptr[1] -VALUE -Fdic_new(class) +static VALUE +Sdic_new(class) VALUE class; { int i, max; @@ -50,6 +50,12 @@ Fdic_new(class) return (VALUE)dic; } +VALUE +dic_new() +{ + return Sdic_new(C_Dict); +} + static VALUE Fdic_clone(dic) struct RDict *dic; @@ -216,7 +222,7 @@ static dic_to_a(key, value, ary) VALUE key, value, ary; { - Fary_push(ary, assoc_new(key, value)); + ary_push(ary, assoc_new(key, value)); return ST_CONTINUE; } @@ -269,19 +275,14 @@ static VALUE Fdic_to_s(dic) VALUE dic; { - VALUE str; - - dic = Fdic_to_a(dic); - str = Fary_to_s(dic); - - return str; + return Fary_to_s(Fdic_to_a(dic)); } static dic_keys(key, value, ary) VALUE key, value, ary; { - Fary_push(ary, key); + ary_push(ary, key); return ST_CONTINUE; } @@ -301,7 +302,7 @@ static dic_values(key, value, ary) VALUE key, value, ary; { - Fary_push(ary, key); + ary_push(ary, key); return ST_CONTINUE; } @@ -542,7 +543,7 @@ Init_Dict() rb_include_module(C_Dict, M_Enumerable); - rb_define_single_method(C_Dict, "new", Fdic_new, 0); + rb_define_single_method(C_Dict, "new", Sdic_new, 0); rb_define_method(C_Dict,"clone", Fdic_clone, 0); @@ -3,7 +3,7 @@ dir.c - $Author: matz $ - $Date: 1994/10/14 06:19:12 $ + $Date: 1994/12/06 09:29:55 $ created at: Wed Jan 5 09:51:01 JST 1994 Copyright (C) 1994 Yukihiro Matsumoto @@ -47,7 +47,7 @@ free_dir(dir) } static VALUE -Fdir_open(dir_class, dirname) +Sdir_open(dir_class, dirname) VALUE dir_class; struct RString *dirname; { @@ -146,7 +146,7 @@ Fdir_close(dir) char *getenv(); static VALUE -Fdir_chdir(obj, args) +Sdir_chdir(obj, args) VALUE obj, args; { VALUE path; @@ -171,7 +171,7 @@ Fdir_chdir(obj, args) } static VALUE -Fdir_getwd(dir) +Sdir_getwd(dir) VALUE dir; { extern char *getwd(); @@ -187,7 +187,7 @@ Fdir_getwd(dir) } static VALUE -Fdir_chroot(dir, path) +Sdir_chroot(dir, path) VALUE dir, path; { Check_Type(path, T_STRING); @@ -199,7 +199,7 @@ Fdir_chroot(dir, path) } static VALUE -Fdir_mkdir(obj, args) +Sdir_mkdir(obj, args) VALUE obj, args; { VALUE path, vmode; @@ -220,7 +220,7 @@ Fdir_mkdir(obj, args) } static VALUE -Fdir_rmdir(obj, dir) +Sdir_rmdir(obj, dir) VALUE obj; struct RString *dir; { @@ -240,7 +240,7 @@ Init_Dir() rb_include_module(C_Dir, M_Enumerable); - rb_define_single_method(C_Dir, "open", Fdir_open, 1); + rb_define_single_method(C_Dir, "open", Sdir_open, 1); rb_define_method(C_Dir,"each", Fdir_each, 0); rb_define_method(C_Dir,"rewind", Fdir_rewind, 0); @@ -248,14 +248,14 @@ Init_Dir() rb_define_method(C_Dir,"seek", Fdir_seek, 1); rb_define_method(C_Dir,"close", Fdir_close, 0); - rb_define_single_method(C_Dir,"chdir", Fdir_chdir, -2); - rb_define_single_method(C_Dir,"getwd", Fdir_getwd, 0); - rb_define_single_method(C_Dir,"pwd", Fdir_getwd, 0); - rb_define_single_method(C_Dir,"chroot", Fdir_chroot, 1); - rb_define_single_method(C_Dir,"mkdir", Fdir_mkdir, -2); - rb_define_single_method(C_Dir,"rmdir", Fdir_rmdir, 1); - rb_define_single_method(C_Dir,"delete", Fdir_rmdir, 1); - rb_define_single_method(C_Dir,"unlink", Fdir_rmdir, 1); + rb_define_single_method(C_Dir,"chdir", Sdir_chdir, -2); + rb_define_single_method(C_Dir,"getwd", Sdir_getwd, 0); + rb_define_single_method(C_Dir,"pwd", Sdir_getwd, 0); + rb_define_single_method(C_Dir,"chroot", Sdir_chroot, 1); + rb_define_single_method(C_Dir,"mkdir", Sdir_mkdir, -2); + rb_define_single_method(C_Dir,"rmdir", Sdir_rmdir, 1); + rb_define_single_method(C_Dir,"delete", Sdir_rmdir, 1); + rb_define_single_method(C_Dir,"unlink", Sdir_rmdir, 1); id_dir = rb_intern("dir"); } @@ -13,6 +13,7 @@ #include <stdio.h> #include <sys/param.h> #include <sys/file.h> +#include "config.h" #include "defines.h" #include "dln.h" #include <sys/types.h> @@ -3,7 +3,7 @@ enum.c - $Author: matz $ - $Date: 1994/08/12 04:47:18 $ + $Date: 1994/12/06 09:29:56 $ created at: Fri Oct 1 15:15:19 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -27,7 +27,7 @@ enum_grep(i, arg) VALUE i, *arg; { if (rb_funcall(arg[0], id_match, 1, i)) { - Fary_push(arg[1], i); + ary_push(arg[1], i); } } @@ -85,7 +85,7 @@ enum_find_all(i, tmp) VALUE i; { if (rb_yield(i)) { - Fary_push(tmp, i); + ary_push(tmp, i); } } @@ -109,7 +109,7 @@ enum_collect(i, tmp) retval = rb_yield(i); if (retval) { - Fary_push(tmp, retval); + ary_push(tmp, retval); } } @@ -129,7 +129,7 @@ static void enum_reverse(i, tmp) VALUE i, tmp; { - Fary_unshift(tmp, i); + ary_unshift(tmp, i); } static VALUE @@ -148,7 +148,7 @@ static void enum_all(i, ary) VALUE i, ary; { - Fary_push(ary, i); + ary_push(ary, i); } static VALUE @@ -3,7 +3,7 @@ etc.c - $Author: matz $ - $Date: 1994/11/01 08:27:53 $ + $Date: 1994/12/06 09:29:57 $ created at: Tue Mar 22 18:39:19 JST 1994 ************************************************/ @@ -119,7 +119,7 @@ setup_group(grp) mem = ary_new(); tbl = grp->gr_mem; while (*tbl) { - Fary_push(mem, str_new2(*tbl)); + ary_push(mem, str_new2(*tbl)); tbl++; } return struct_new("group", @@ -3,7 +3,7 @@ eval.c - $Author: matz $ - $Date: 1994/11/22 01:22:33 $ + $Date: 1994/12/06 09:29:59 $ created at: Thu Jun 10 14:22:17 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -999,11 +999,8 @@ rb_eval(node) case NODE_HASH: { - extern VALUE C_Dict; - extern VALUE Fdic_new(); NODE *list; - - VALUE hash = Fdic_new(C_Dict); + VALUE hash = dic_new(); VALUE key, val; list = node->nd_head; @@ -1321,7 +1318,7 @@ rb_fail(mesg) errstr = mesg; } else { - errstr = Fstr_clone(mesg); + errstr = str_clone(mesg); str_cat(errstr, "\n", 1); } } @@ -1965,7 +1962,6 @@ find_file(file) sep = str_new2(":"); vpath = ary_join(rb_load_path, sep); path = RSTRING(vpath)->ptr; - obj_free(sep); sep = Qnil; } else { @@ -1975,8 +1971,6 @@ find_file(file) found = dln_find_file(file, path); if (found == Qnil) Fail("No such file to load -- %s", file); - if (vpath) obj_free(vpath); - return found; } @@ -2010,7 +2004,6 @@ Fload(obj, fname) } } #endif - PUSH_TAG(); DUP_ENV(); PUSH_CLASS(); @@ -2051,12 +2044,12 @@ Frequire(obj, fname) file = find_file(fname->ptr); p = RARRAY(rb_loadfiles)->ptr; - pend = p+ RARRAY(rb_loadfiles)->len; + pend = p + RARRAY(rb_loadfiles)->len; while (p < pend) { Check_Type(*p, T_STRING); if (strcmp(RSTRING(*p)->ptr, file) == 0) return FALSE; } - Fary_push(rb_loadfiles, str_new2(file)); + ary_push(rb_loadfiles, str_new2(file)); Fload(obj, fname); return TRUE; @@ -2083,11 +2076,11 @@ addpath(path) while (*p) { while (*p == RUBY_LIB_SEP) p++; if (s = strchr(p, RUBY_LIB_SEP)) { - Fary_push(rb_load_path, str_new(p, (int)(s-p))); + ary_push(rb_load_path, str_new(p, (int)(s-p))); p = s + 1; } else { - Fary_push(rb_load_path, str_new2(p)); + ary_push(rb_load_path, str_new2(p)); break; } } @@ -4,7 +4,7 @@ file.c - $Author: matz $ - $Date: 1994/11/22 01:22:34 $ + $Date: 1994/12/06 09:30:00 $ created at: Mon Nov 15 12:24:34 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -255,7 +255,7 @@ cache_stat(path, st) } static VALUE -Ffile_stat(obj, fname) +Sfile_stat(obj, fname) VALUE obj; struct RString *fname; { @@ -269,7 +269,7 @@ Ffile_stat(obj, fname) } static VALUE -Ffile_stat2(obj) +Ffile_stat(obj) VALUE obj; { OpenFile *fptr; @@ -283,7 +283,7 @@ Ffile_stat2(obj) } static VALUE -Ffile_lstat(obj, fname) +Sfile_lstat(obj, fname) VALUE obj; struct RString *fname; { @@ -297,7 +297,7 @@ Ffile_lstat(obj, fname) } static VALUE -Ffile_lstat2(obj) +Ffile_lstat(obj) VALUE obj; { OpenFile *fptr; @@ -705,7 +705,7 @@ Ftest_sticky(obj, fname) } static VALUE -Ffile_type(obj, fname) +Sfile_type(obj, fname) VALUE obj; struct RString *fname; { @@ -750,7 +750,7 @@ Ffile_type(obj, fname) } static VALUE -Ffile_atime(obj, fname) +Sfile_atime(obj, fname) VALUE obj; struct RString *fname; { @@ -762,7 +762,7 @@ Ffile_atime(obj, fname) } static VALUE -Ffile_atime2(obj) +Ffile_atime(obj) VALUE obj; { OpenFile *fptr; @@ -776,7 +776,7 @@ Ffile_atime2(obj) } static VALUE -Ffile_mtime(obj, fname) +Sfile_mtime(obj, fname) VALUE obj; struct RString *fname; { @@ -788,7 +788,7 @@ Ffile_mtime(obj, fname) } static VALUE -Ffile_mtime2(obj) +Ffile_mtime(obj) VALUE obj; { OpenFile *fptr; @@ -802,7 +802,7 @@ Ffile_mtime2(obj) } static VALUE -Ffile_ctime(obj, fname) +Sfile_ctime(obj, fname) VALUE obj; struct RString *fname; { @@ -814,7 +814,7 @@ Ffile_ctime(obj, fname) } static VALUE -Ffile_ctime2(obj) +Ffile_ctime(obj) VALUE obj; { OpenFile *fptr; @@ -837,7 +837,7 @@ chmod_internal(path, mode) } static VALUE -Ffile_chmod(obj, args) +Sfile_chmod(obj, args) VALUE obj, args; { VALUE vmode; @@ -853,7 +853,7 @@ Ffile_chmod(obj, args) } static VALUE -Ffile_chmod2(obj, vmode) +Ffile_chmod(obj, vmode) VALUE obj, vmode; { OpenFile *fptr; @@ -882,7 +882,7 @@ chown_internal(path, args) } static VALUE -Ffile_chown(obj, args) +Sfile_chown(obj, args) VALUE obj, args; { VALUE o, g, rest; @@ -907,7 +907,7 @@ Ffile_chown(obj, args) return INT2FIX(n); } -Ffile_chown2(obj, owner, group) +Ffile_chown(obj, owner, group) VALUE obj, owner, group; { OpenFile *fptr; @@ -932,7 +932,7 @@ utime_internal(path, tvp) } static VALUE -Ffile_utime(obj, args) +Sfile_utime(obj, args) VALUE obj, args; { VALUE atime, mtime, rest; @@ -949,7 +949,7 @@ Ffile_utime(obj, args) } static VALUE -Ffile_link(obj, from, to) +Sfile_link(obj, from, to) VALUE obj; struct RString *from, *to; { @@ -962,7 +962,7 @@ Ffile_link(obj, from, to) } static VALUE -Ffile_symlink(obj, from, to) +Sfile_symlink(obj, from, to) VALUE obj; struct RString *from, *to; { @@ -974,7 +974,8 @@ Ffile_symlink(obj, from, to) return TRUE; } -Ffile_readlink(obj, path) +static VALUE +Sfile_readlink(obj, path) VALUE obj; struct RString *path; { @@ -998,7 +999,7 @@ unlink_internal(path) } static VALUE -Ffile_unlink(obj, args) +Sfile_unlink(obj, args) VALUE obj; struct RArray *args; { @@ -1009,7 +1010,7 @@ Ffile_unlink(obj, args) } static VALUE -Ffile_rename(obj, from, to) +Sfile_rename(obj, from, to) VALUE obj; struct RString *from, *to; { @@ -1023,7 +1024,7 @@ Ffile_rename(obj, from, to) } static VALUE -Ffile_umask(argc, argv) +Sfile_umask(argc, argv) int argc; VALUE *argv; { @@ -1044,7 +1045,7 @@ Ffile_umask(argc, argv) } static VALUE -Ffile_truncate(obj, path, len) +Sfile_truncate(obj, path, len) VALUE obj, len; struct RString *path; { @@ -1056,7 +1057,7 @@ Ffile_truncate(obj, path, len) } static VALUE -Ffile_truncate2(obj, len) +Ffile_truncate(obj, len) VALUE obj, len; { OpenFile *fptr; @@ -1125,40 +1126,40 @@ Init_File() C_File = rb_define_class("File", C_IO); - rb_define_single_method(C_File, "stat", Ffile_stat, 1); - rb_define_single_method(C_File, "lstat", Ffile_lstat, 1); - rb_define_single_method(C_File, "type", Ffile_type, 1); + rb_define_single_method(C_File, "stat", Sfile_stat, 1); + rb_define_single_method(C_File, "lstat", Sfile_lstat, 1); + rb_define_single_method(C_File, "type", Sfile_type, 1); - rb_define_single_method(C_File, "atime", Ffile_atime, 1); - rb_define_single_method(C_File, "mtime", Ffile_mtime, 1); - rb_define_single_method(C_File, "ctime", Ffile_ctime, 1); + rb_define_single_method(C_File, "atime", Sfile_atime, 1); + rb_define_single_method(C_File, "mtime", Sfile_mtime, 1); + rb_define_single_method(C_File, "ctime", Sfile_ctime, 1); - rb_define_single_method(C_File, "utime", Ffile_utime, -2); - rb_define_single_method(C_File, "chmod", Ffile_chmod, -2); - rb_define_single_method(C_File, "chown", Ffile_chown, -2); + rb_define_single_method(C_File, "utime", Sfile_utime, -2); + rb_define_single_method(C_File, "chmod", Sfile_chmod, -2); + rb_define_single_method(C_File, "chown", Sfile_chown, -2); - rb_define_single_method(C_File, "link", Ffile_link, 2); - rb_define_single_method(C_File, "symlink", Ffile_symlink, 2); - rb_define_single_method(C_File, "readlink", Ffile_readlink, 1); + rb_define_single_method(C_File, "link", Sfile_link, 2); + rb_define_single_method(C_File, "symlink", Sfile_symlink, 2); + rb_define_single_method(C_File, "readlink", Sfile_readlink, 1); - rb_define_single_method(C_File, "unlink", Ffile_unlink, -2); - rb_define_single_method(C_File, "delete", Ffile_unlink, -2); - rb_define_single_method(C_File, "rename", Ffile_rename, 2); - rb_define_single_method(C_File, "umask", Ffile_umask, -1); - rb_define_single_method(C_File, "truncate", Ffile_truncate, 2); + rb_define_single_method(C_File, "unlink", Sfile_unlink, -2); + rb_define_single_method(C_File, "delete", Sfile_unlink, -2); + rb_define_single_method(C_File, "rename", Sfile_rename, 2); + rb_define_single_method(C_File, "umask", Sfile_umask, -1); + rb_define_single_method(C_File, "truncate", Sfile_truncate, 2); rb_include_module(CLASS_OF(C_File), M_FileTest); - rb_define_method(C_File, "stat", Ffile_stat2, 0); - rb_define_method(C_File, "lstat", Ffile_lstat2, 0); + rb_define_method(C_File, "stat", Ffile_stat, 0); + rb_define_method(C_File, "lstat", Ffile_lstat, 0); - rb_define_method(C_File, "atime", Ffile_atime2, 0); - rb_define_method(C_File, "mtime", Ffile_mtime2, 0); - rb_define_method(C_File, "ctime", Ffile_ctime2, 0); + rb_define_method(C_File, "atime", Ffile_atime, 0); + rb_define_method(C_File, "mtime", Ffile_mtime, 0); + rb_define_method(C_File, "ctime", Ffile_ctime, 0); - rb_define_method(C_File, "chmod", Ffile_chmod2, 1); - rb_define_method(C_File, "chown", Ffile_chown2, 2); - rb_define_method(C_File, "truncate", Ffile_truncate2, 1); + rb_define_method(C_File, "chmod", Ffile_chmod, 1); + rb_define_method(C_File, "chown", Ffile_chown, 2); + rb_define_method(C_File, "truncate", Ffile_truncate, 1); rb_define_method(C_File, "tell", Ffile_tell, 0); rb_define_method(C_File, "seek", Ffile_seek, 2); @@ -16,6 +16,7 @@ License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "config.h" #include <errno.h> #include "fnmatch.h" @@ -3,7 +3,7 @@ gc.c - $Author: matz $ - $Date: 1994/11/01 08:27:58 $ + $Date: 1994/12/06 09:30:02 $ created at: Tue Oct 5 09:44:46 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -110,7 +110,7 @@ Cambridge, MA 02138 static int dont_gc; VALUE -Fgc_enable() +Sgc_enable() { int old = dont_gc; @@ -119,7 +119,7 @@ Fgc_enable() } VALUE -Fgc_disable() +Sgc_disable() { int old = dont_gc; @@ -130,12 +130,14 @@ Fgc_disable() #include <sys/types.h> #include <sys/times.h> -static Fgc_begin() +static +Fgc_begin() { return Qnil; } -static Fgc_end() +static +Fgc_end() { return Qnil; } @@ -234,14 +236,19 @@ newobj() } VALUE -newdata(size) - UINT size; +data_new(datap, dfree, dmark) + VALUE *datap; + void (*dfree)(); + void (*dmark)(); { extern VALUE C_Data; struct RData *data = (struct RData*)newobj(); OBJSETUP(data, C_Data, T_DATA); - data->data = xmalloc(size); + data->data = datap; + data->dfree = dfree; + data->dmark = dmark; + return (VALUE)data; } @@ -445,6 +452,8 @@ gc_mark(obj) #define MIN_FREE_OBJ 512 +static void obj_free(); + static void gc_sweep() { @@ -509,6 +518,7 @@ freemethod(key, body) return ST_CONTINUE; } +static void obj_free(obj) struct RBasic *obj; { @@ -632,7 +642,7 @@ Init_GC() { M_GC = rb_define_module("GC"); rb_define_single_method(M_GC, "start", gc, 0); - rb_define_single_method(M_GC, "enable", Fgc_enable, 0); - rb_define_single_method(M_GC, "disable", Fgc_disable, 0); + rb_define_single_method(M_GC, "enable", Sgc_enable, 0); + rb_define_single_method(M_GC, "disable", Sgc_disable, 0); rb_define_method(M_GC, "garbage_collect", gc, 0); } diff --git a/missing/getopt.c b/getopt.c index bbf345c33c..bfc4013b29 100644 --- a/missing/getopt.c +++ b/getopt.c @@ -19,9 +19,7 @@ License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef GAWK #include "config.h" -#endif #include <stdio.h> diff --git a/missing/getopt.h b/getopt.h index de027434f7..de027434f7 100644 --- a/missing/getopt.h +++ b/getopt.h diff --git a/missing/getopt1.c b/getopt1.c index eb06338ab3..7f824232d7 100644 --- a/missing/getopt1.c +++ b/getopt1.c @@ -17,14 +17,14 @@ License along with libiberty; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "config.h" + #ifdef LIBC /* For when compiled as part of the GNU C library. */ #include <ansidecl.h> #endif -#ifndef RUBY #include "getopt.h" -#endif #ifndef __STDC__ #define const @@ -19,6 +19,8 @@ Unix programs use to perform this function. I wrote this from scratch based on specifications for the pattern matching. --RMS. */ +#include "config.h" + #if defined (SHELL) # if defined (HAVE_STDLIB_H) # include <stdlib.h> @@ -3,7 +3,7 @@ io.c - $Author: matz $ - $Date: 1994/11/22 01:22:36 $ + $Date: 1994/12/06 09:30:03 $ created at: Fri Oct 15 18:08:59 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -37,7 +37,7 @@ extern char *inplace; /* writing functions */ VALUE -Fio_write(obj, str) +io_write(obj, str) VALUE obj; struct RString *str; { @@ -74,7 +74,7 @@ static VALUE Fio_puts(obj, str) VALUE obj, str; { - Fio_write(obj, str); + io_write(obj, str); return obj; } @@ -691,13 +691,23 @@ Fprint(argc, argv) else { for (i=0; i<argc; i++) { if (OFS && i>0) { - Fio_write(rb_defout, OFS); + io_write(rb_defout, OFS); + } + switch (TYPE(argv[i])) { + case T_STRING: + io_write(rb_defout, argv[i]); + break; + case T_ARRAY: + Fary_print_on(argv[i], rb_defout); + break; + default: + rb_funcall(argv[i], id_print_on, 1, rb_defout); + break; } - rb_funcall(argv[i], id_print_on, 1, rb_defout); } } if (ORS) { - Fio_write(rb_defout, ORS); + io_write(rb_defout, ORS); } return Qnil; @@ -720,7 +730,7 @@ static VALUE Fprint_on(obj, port) VALUE obj, port; { - return Fio_write(port, obj); + return io_write(port, obj); } static VALUE @@ -738,7 +748,7 @@ prep_stdio(f, mode) return obj; } -static VALUE filename = Qnil, file = Qnil; +static VALUE filename, file; static int gets_lineno; static int init_p = 0, next_p = 0; @@ -764,7 +774,7 @@ next_argv() if (next_p == 1) { next_p = 0; if (RARRAY(Argv)->len > 0) { - filename = Fary_shift(Argv); + filename = ary_shift(Argv); fn = RSTRING(filename)->ptr; if (RSTRING(filename)->len == 1 && fn[0] == '-') { file = rb_stdin; @@ -795,7 +805,6 @@ next_argv() fclose(fr); goto retry; } - obj_free(str); fw = fopen(fn, "w"); fstat(fileno(fw), &st2); fchmod(fileno(fw), st.st_mode); @@ -861,7 +870,7 @@ Freadlines(obj) ary = ary_new(); while (line = Fgets(obj)) { - Fary_push(ary, line); + ary_push(ary, line); } return ary; @@ -895,8 +904,6 @@ rb_xstring(str) rb_syswait(fptr->pid); fptr->pid = 0; - obj_free(port); - return result; } @@ -1026,7 +1033,7 @@ Fselect(obj, args) GetOpenFile(RARRAY(read)->ptr[i], fptr); if (FD_ISSET(fileno(fptr->f), rp) || FD_ISSET(fileno(fptr->f), &pset)) { - Fary_push(list, RARRAY(read)->ptr[i]); + ary_push(list, RARRAY(read)->ptr[i]); } } } @@ -1036,10 +1043,10 @@ Fselect(obj, args) for (i=0; i< RARRAY(write)->len; i++) { GetOpenFile(RARRAY(write)->ptr[i], fptr); if (FD_ISSET(fileno(fptr->f), rp)) { - Fary_push(list, RARRAY(write)->ptr[i]); + ary_push(list, RARRAY(write)->ptr[i]); } else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), rp)) { - Fary_push(list, RARRAY(write)->ptr[i]); + ary_push(list, RARRAY(write)->ptr[i]); } } } @@ -1049,10 +1056,10 @@ Fselect(obj, args) for (i=0; i< RARRAY(except)->len; i++) { GetOpenFile(RARRAY(except)->ptr[i], fptr); if (FD_ISSET(fileno(fptr->f), rp)) { - Fary_push(list, RARRAY(except)->ptr[i]); + ary_push(list, RARRAY(except)->ptr[i]); } else if (fptr->f2 && FD_ISSET(fileno(fptr->f2), rp)) { - Fary_push(list, RARRAY(except)->ptr[i]); + ary_push(list, RARRAY(except)->ptr[i]); } } } @@ -1266,9 +1273,15 @@ Farg_each_byte() } static VALUE -Farg_to_s() +Farg_filename() { - return str_new2("$ARGF"); + return filename; +} + +static VALUE +Farg_file() +{ + return file; } extern VALUE M_Enumerable; @@ -1307,10 +1320,6 @@ Init_IO() rb_define_variable("$/", &RS, Qnil, rb_check_str); rb_define_variable("$\\", &ORS, Qnil, rb_check_str); - rb_define_variable("$<", &filename, Qnil, rb_readonly_hook); - rb_define_variable("$FILENAME", &filename, Qnil, rb_readonly_hook); - rb_global_variable(&file); - rb_define_variable("$.", &lineno, Qnil, Qnil); rb_define_variable("$_", &rb_lastline, Qnil, Qnil); @@ -1329,7 +1338,7 @@ Init_IO() rb_define_alias(C_IO, "readlines", "to_a"); rb_define_method(C_IO, "read", Fio_read, -2); - rb_define_method(C_IO, "write", Fio_write, 1); + rb_define_method(C_IO, "write", io_write, 1); rb_define_method(C_IO, "gets", Fio_gets, 0); rb_define_alias(C_IO, "readline", "gets"); rb_define_method(C_IO, "getc", Fio_getc, 0); @@ -1355,6 +1364,7 @@ Init_IO() rb_define_variable("$>", &rb_defout, Qnil, io_defset); argf = obj_alloc(C_Object); + rb_define_variable("$<", &argf, Qnil, rb_readonly_hook); rb_define_variable("$ARGF", &argf, Qnil, rb_readonly_hook); rb_define_single_method(argf, "each", Farg_each, 0); @@ -1367,8 +1377,15 @@ Init_IO() rb_define_single_method(argf, "getc", Farg_getc, 0); rb_define_single_method(argf, "eof", Feof, 0); - rb_define_single_method(argf, "to_s", Farg_to_s, 0); + rb_define_single_method(argf, "to_s", Farg_filename, 0); + rb_define_single_method(argf, "filename", Farg_filename, 0); + rb_define_single_method(argf, "file", Farg_file, 0); rb_include_module(CLASS_OF(argf), M_Enumerable); + filename = str_new2("-"); + rb_define_variable("$FILENAME", &filename, Qnil, rb_readonly_hook); + file = rb_stdin; + rb_global_variable(&file); + Init_File(); } diff --git a/missing.c b/missing.c deleted file mode 100644 index cccadb494f..0000000000 --- a/missing.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Do all necessary includes here, so that we don't have to worry about - * overlapping includes in the files in missing.d. - */ - -#include <stdio.h> -#include <ctype.h> -#include <errno.h> -#include <sys/time.h> -#include <sys/types.h> - -#include "ruby.h" - -#ifndef __STDC__ -#define const -#endif /* !__STDC__ */ - -#ifdef STDC_HEADERS -#include <string.h> -#endif - -#ifndef HAVE_MEMMOVE -#include "missing/memmove.c" -#endif - -#ifndef HAVE_STRERROR -#include "missing/strerror.c" -#endif - -#ifndef HAVE_STRTOUL -#include "missing/strtoul.c" -#endif - -#ifndef HAVE_STRFTIME -#include "missing/strftime.c" -#endif - -#ifndef HAVE_STRSTR -#include "missing/strstr.c" -#endif - -#ifndef HAVE_GETOPT_LONG -#include "missing/getopt.h" -#include "missing/getopt.c" -#include "missing/getopt1.c" -#endif - -#ifndef HAVE_MKDIR -#include "missing/mkdir.c" -#endif - -#ifndef HAVE_STRDUP -char * -strdup(str) - char *str; -{ - extern char *xmalloc(); - char *tmp; - int len = strlen(str) + 1; - - tmp = xmalloc(len); - if (tmp == NULL) return NULL; - memcpy(tmp, str, len); - - return tmp; -} -#endif diff --git a/missing/CVS/Entries b/missing/CVS/Entries deleted file mode 100644 index 2c02d6e353..0000000000 --- a/missing/CVS/Entries +++ /dev/null @@ -1,9 +0,0 @@ -/getopt.c/0.26/Wed Jun 1 23:41:18 1994 Mon Apr 18 12:30:25 1994// -/getopt.h/0.26/Wed Jun 1 23:41:18 1994 Mon Apr 18 12:30:25 1994// -/getopt1.c/0.26/Wed Jun 1 23:41:18 1994 Mon Apr 18 12:30:25 1994// -/memmove.c/0.26/Wed Jun 1 23:41:18 1994 Mon Apr 18 12:30:25 1994// -/mkdir.c/1.1/Wed Jun 1 23:41:18 1994 Wed Jun 1 23:38:35 1994// -/strerror.c/0.26/Wed Jun 1 23:41:18 1994 Mon Apr 18 12:30:25 1994// -/strftime.c/0.26/Wed Jun 1 23:41:19 1994 Mon Apr 18 12:30:25 1994// -/strtol.c/0.26/Wed Jun 1 23:41:19 1994 Mon Apr 18 12:30:25 1994// -/strtoul.c/0.26/Wed Jun 1 23:41:19 1994 Mon Apr 18 12:30:25 1994// diff --git a/missing/CVS/Repository b/missing/CVS/Repository deleted file mode 100644 index a7ac69cf13..0000000000 --- a/missing/CVS/Repository +++ /dev/null @@ -1 +0,0 @@ -/work/cvsroot/ruby/missing diff --git a/missing/alloca.c b/missing/alloca.c new file mode 100644 index 0000000000..6879618c8a --- /dev/null +++ b/missing/alloca.c @@ -0,0 +1,189 @@ +/* alloca -- (mostly) portable public-domain implementation -- D A Gwyn + + last edit: 86/05/30 rms + include config.h, since on VMS it renames some symbols. + Use xmalloc instead of malloc. + + This implementation of the PWB library alloca() function, + which is used to allocate space off the run-time stack so + that it is automatically reclaimed upon procedure exit, + was inspired by discussions with J. Q. Johnson of Cornell. + + It should work under any C implementation that uses an + actual procedure stack (as opposed to a linked list of + frames). There are some preprocessor constants that can + be defined when compiling for your specific system, for + improved efficiency; however, the defaults should be okay. + + The general concept of this implementation is to keep + track of all alloca()-allocated blocks, and reclaim any + that are found to be deeper in the stack than the current + invocation. This heuristic does not reclaim storage as + soon as it becomes invalid, but it will do so eventually. + + As a special case, alloca(0) reclaims storage without + allocating any. It is a good idea to use alloca(0) in + your main control loop, etc. to force garbage collection. +*/ +#ifndef lint +static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */ +#endif + +#include "config.h" +#ifdef emacs +#ifdef static +/* actually, only want this if static is defined as "" + -- this is for usg, in which emacs must undefine static + in order to make unexec workable + */ +#ifndef STACK_DIRECTION +you +lose +-- must know STACK_DIRECTION at compile-time +#endif /* STACK_DIRECTION undefined */ +#endif /* static */ +#endif /* emacs */ + +#ifdef X3J11 +typedef void *pointer; /* generic pointer type */ +#else +typedef char *pointer; /* generic pointer type */ +#endif /* X3J11 */ + +#define NULL 0 /* null pointer constant */ + +extern void free(); +extern pointer xmalloc(); + +/* + Define STACK_DIRECTION if you know the direction of stack + growth for your system; otherwise it will be automatically + deduced at run-time. + + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown +*/ + +#ifndef STACK_DIRECTION +#define STACK_DIRECTION 0 /* direction unknown */ +#endif + +#if STACK_DIRECTION != 0 + +#define STACK_DIR STACK_DIRECTION /* known at compile-time */ + +#else /* STACK_DIRECTION == 0; need run-time code */ + +static int stack_dir; /* 1 or -1 once known */ +#define STACK_DIR stack_dir + +static void +find_stack_direction (/* void */) +{ + static char *addr = NULL; /* address of first + `dummy', once known */ + auto char dummy; /* to get stack address */ + + if (addr == NULL) + { /* initial entry */ + addr = &dummy; + + find_stack_direction (); /* recurse once */ + } + else /* second entry */ + if (&dummy > addr) + stack_dir = 1; /* stack grew upward */ + else + stack_dir = -1; /* stack grew downward */ +} + +#endif /* STACK_DIRECTION == 0 */ + +/* + An "alloca header" is used to: + (a) chain together all alloca()ed blocks; + (b) keep track of stack depth. + + It is very important that sizeof(header) agree with malloc() + alignment chunk size. The following default should work okay. +*/ + +#ifndef ALIGN_SIZE +#define ALIGN_SIZE sizeof(double) +#endif + +typedef union hdr +{ + char align[ALIGN_SIZE]; /* to force sizeof(header) */ + struct + { + union hdr *next; /* for chaining headers */ + char *deep; /* for stack depth measure */ + } h; +} header; + +/* + alloca( size ) returns a pointer to at least `size' bytes of + storage which will be automatically reclaimed upon exit from + the procedure that called alloca(). Originally, this space + was supposed to be taken from the current stack frame of the + caller, but that method cannot be made to work for some + implementations of C, for example under Gould's UTX/32. +*/ + +static header *last_alloca_header = NULL; /* -> last alloca header */ + +pointer +alloca (size) /* returns pointer to storage */ + unsigned size; /* # bytes to allocate */ +{ + auto char probe; /* probes stack depth: */ + register char *depth = &probe; + +#if STACK_DIRECTION == 0 + if (STACK_DIR == 0) /* unknown growth direction */ + find_stack_direction (); +#endif + + /* Reclaim garbage, defined as all alloca()ed storage that + was allocated from deeper in the stack than currently. */ + { + register header *hp; /* traverses linked list */ + + for (hp = last_alloca_header; hp != NULL;) + if (STACK_DIR > 0 && hp->h.deep > depth + || STACK_DIR < 0 && hp->h.deep < depth) + { + register header *np = hp->h.next; + + free ((pointer) hp); /* collect garbage */ + + hp = np; /* -> next header */ + } + else + break; /* rest are not deeper */ + + last_alloca_header = hp; /* -> last valid storage */ + } + + if (size == 0) + return NULL; /* no allocation required */ + + /* Allocate combined header + user data storage. */ + + { + register pointer new = xmalloc (sizeof (header) + size); + /* address of header */ + + ((header *)new)->h.next = last_alloca_header; + ((header *)new)->h.deep = depth; + + last_alloca_header = (header *)new; + + /* User storage begins just after header. */ + + return (pointer)((char *)new + sizeof(header)); + } +} + diff --git a/missing/strdup.c b/missing/strdup.c new file mode 100644 index 0000000000..2e1fe90bbd --- /dev/null +++ b/missing/strdup.c @@ -0,0 +1,25 @@ +/************************************************ + + strdup.c - + + $Author$ + $Date$ + created at: Wed Dec 7 15:34:01 JST 1994 + +************************************************/ +#include <stdio.h> + +char * +strdup(str) + char *str; +{ + extern char *xmalloc(); + char *tmp; + int len = strlen(str) + 1; + + tmp = xmalloc(len); + if (tmp == NULL) return NULL; + memcpy(tmp, str, len); + + return tmp; +} diff --git a/missing/strftime.c b/missing/strftime.c index 4d3561c78c..313b9d00a1 100644 --- a/missing/strftime.c +++ b/missing/strftime.c @@ -35,16 +35,14 @@ * February 1994 */ -#ifndef RUBY +#include "config.h" + #include <stdio.h> #include <ctype.h> #include <string.h> #include <time.h> -#endif -#if defined(TM_IN_SYS_TIME) || ! defined(RUBY) #include <sys/types.h> #include <sys/time.h> -#endif /* defaults: season to taste */ #define SYSV_EXT 1 /* stuff in System V ascftime routine */ diff --git a/newver.rb b/newver.rb deleted file mode 100755 index 884e873ba4..0000000000 --- a/newver.rb +++ /dev/null @@ -1,19 +0,0 @@ -#! /usr/local/bin/ruby -f = open("version.h", "r") -f.gets() -f.close - -if $_ =~ /"(\d+)\.(\d+)"/; - f = open("version.h", "w") - i = $2.to_i - if $ARGV[0] == "-f" - i += 1 - end - date = Time.now.strftime("%y/%m/%d") - printf("ruby - version %d.%0d (%s)\n", $1, i, date) - printf(f, "#define RUBY_VERSION \"%d.%0d\"\n", $1, i) - printf(f, "#define VERSION_DATE \"%s\"\n", date) - f.close -else - printf("match error - %s\n", $_) -end @@ -3,7 +3,7 @@ numeric.c - $Author: matz $ - $Date: 1994/11/01 08:28:06 $ + $Date: 1994/12/06 09:30:05 $ created at: Fri Aug 13 18:33:09 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -22,7 +22,6 @@ VALUE C_Float; VALUE C_Integer; VALUE C_Fixnum; -extern VALUE C_Range; double big2dbl(); VALUE @@ -64,7 +63,7 @@ Fnum_dot2(left, right) { Need_Fixnum(left); Need_Fixnum(right); - return range_new(C_Range, left, right); + return range_new(left, right); } static VALUE @@ -768,7 +767,7 @@ Ffix_dot2(left, right) VALUE left, right; { Need_Fixnum(right); - return range_new(C_Range, left, right); + return range_new(left, right); } static VALUE @@ -885,7 +884,8 @@ Ffix_class(fix) return C_Fixnum; } -static Ffix_abs(fix) +static +Ffix_abs(fix) VALUE fix; { int i = FIX2INT(fix); @@ -3,7 +3,7 @@ object.c - $Author: matz $ - $Date: 1994/11/01 08:28:07 $ + $Date: 1994/12/06 09:30:06 $ created at: Thu Jul 15 12:01:24 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -325,6 +325,7 @@ Fcls_export(argc, argv) VALUE *argv; { Fcls_export_internal(argc, argv, 0); + return Qnil; } static VALUE @@ -333,6 +334,7 @@ Fcls_unexport(argc, argv) VALUE *argv; { Fcls_export_internal(argc, argv, 1); + return Qnil; } static VALUE @@ -3,7 +3,7 @@ pack.c - $Author: matz $ - $Date: 1994/10/14 06:19:34 $ + $Date: 1994/12/06 09:30:08 $ created at: Thu Feb 10 15:17:05 JST 1994 Copyright (C) 1994 Yukihiro Matsumoto @@ -529,7 +529,7 @@ Fpck_unpack(str, fmt) } case 'a': if (len > send - s) len = send - s; - Fary_push(ary, str_new(s, len)); + ary_push(ary, str_new(s, len)); s += len; break; @@ -541,7 +541,7 @@ Fpck_unpack(str, fmt) if (p[-1] == '*' || len > (send - s) * 8) len = (send - s) * 8; - Fary_push(ary, bitstr = str_new(0, len + 1)); + ary_push(ary, bitstr = str_new(0, len + 1)); t = RSTRING(bitstr)->ptr; for (i=0; i<len; i++) { if (i & 7) bits >>= 1; @@ -560,7 +560,7 @@ Fpck_unpack(str, fmt) if (p[-1] == '*' || len > (send - s) * 8) len = (send - s) * 8; - Fary_push(ary, bitstr = str_new(0, len + 1)); + ary_push(ary, bitstr = str_new(0, len + 1)); t = RSTRING(bitstr)->ptr; for (i=0; i<len; i++) { if (i & 7) bits <<= 1; @@ -579,7 +579,7 @@ Fpck_unpack(str, fmt) if (p[-1] == '*' || len > (send - s) * 2) len = (send - s) * 2; - Fary_push(ary, bitstr = str_new(0, len + 1)); + ary_push(ary, bitstr = str_new(0, len + 1)); t = RSTRING(bitstr)->ptr; for (i=0; i<len; i++) { if (i & 1) @@ -600,7 +600,7 @@ Fpck_unpack(str, fmt) if (p[-1] == '*' || len > (send - s) * 2) len = (send - s) * 2; - Fary_push(ary, bitstr = str_new(0, len + 1)); + ary_push(ary, bitstr = str_new(0, len + 1)); t = RSTRING(bitstr)->ptr; for (i=0; i<len; i++) { if (i & 1) @@ -618,7 +618,7 @@ Fpck_unpack(str, fmt) len = send - s; while (len-- > 0) { char c = *s++; - Fary_push(ary, INT2FIX(c)); + ary_push(ary, INT2FIX(c)); } break; @@ -627,7 +627,7 @@ Fpck_unpack(str, fmt) len = send - s; while (len-- > 0) { unsigned char c = *s++; - Fary_push(ary, INT2FIX(c)); + ary_push(ary, INT2FIX(c)); } break; @@ -638,7 +638,7 @@ Fpck_unpack(str, fmt) short tmp; memcpy(&tmp, s, sizeof(short)); s += sizeof(short); - Fary_push(ary, INT2FIX(tmp)); + ary_push(ary, INT2FIX(tmp)); } break; @@ -649,7 +649,7 @@ Fpck_unpack(str, fmt) unsigned short tmp; memcpy(&tmp, s, sizeof(unsigned short)); s += sizeof(unsigned short); - Fary_push(ary, INT2FIX(tmp)); + ary_push(ary, INT2FIX(tmp)); } break; @@ -660,7 +660,7 @@ Fpck_unpack(str, fmt) int tmp; memcpy(&tmp, s, sizeof(int)); s += sizeof(int); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -671,7 +671,7 @@ Fpck_unpack(str, fmt) unsigned int tmp; memcpy(&tmp, s, sizeof(unsigned int)); s += sizeof(unsigned int); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -682,7 +682,7 @@ Fpck_unpack(str, fmt) long tmp; memcpy(&tmp, s, sizeof(long)); s += sizeof(long); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -693,7 +693,7 @@ Fpck_unpack(str, fmt) unsigned long tmp; memcpy(&tmp, s, sizeof(unsigned long)); s += sizeof(unsigned long); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -705,7 +705,7 @@ Fpck_unpack(str, fmt) memcpy(&tmp, s, sizeof(short)); s += sizeof(short); tmp = ntohs(tmp); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -717,7 +717,7 @@ Fpck_unpack(str, fmt) memcpy(&tmp, s, sizeof(long)); s += sizeof(long); tmp = ntohl(tmp); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -729,7 +729,7 @@ Fpck_unpack(str, fmt) float tmp; memcpy(&tmp, s, sizeof(float)); s += sizeof(float); - Fary_push(ary, float_new((double)tmp)); + ary_push(ary, float_new((double)tmp)); } break; @@ -741,7 +741,7 @@ Fpck_unpack(str, fmt) double tmp; memcpy(&tmp, s, sizeof(double)); s += sizeof(double); - Fary_push(ary, float_new(tmp)); + ary_push(ary, float_new(tmp)); } break; @@ -753,7 +753,7 @@ Fpck_unpack(str, fmt) memcpy(&tmp, s, sizeof(short)); s += sizeof(short); tmp = vtohs(tmp); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -765,7 +765,7 @@ Fpck_unpack(str, fmt) memcpy(&tmp, s, sizeof(long)); s += sizeof(long); tmp = vtohl(tmp); - Fary_push(ary, int2inum(tmp)); + ary_push(ary, int2inum(tmp)); } break; @@ -812,7 +812,7 @@ Fpck_unpack(str, fmt) s += 2; } RSTRING(str)->len = total; - Fary_push(ary, str); + ary_push(ary, str); } break; @@ -3,7 +3,7 @@ parse.y - $Author: matz $ - $Date: 1994/11/22 01:22:38 $ + $Date: 1994/12/06 09:30:09 $ created at: Fri May 28 18:02:42 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -1283,8 +1283,10 @@ parse_string(term) tokadd(c); } else { + int flags = EXPAND_B; + if (term != '"') flags |= LEAVE_BS; pushback(); - read_escape(LEAVE_BS | EXPAND_B); + read_escape(flags); } continue; } @@ -1364,9 +1366,9 @@ yylex() retry: switch (c = nextc()) { - case '\0': - case '\004': - case '\032': + case '\0': /* NUL */ + case '\004': /* ^D */ + case '\032': /* ^Z */ case -1: /* end of script. */ return 0; @@ -2983,10 +2985,14 @@ rb_class2name(class) Fail("0x%x is not a class/module", class); } - while (FL_TEST(class, FL_SINGLE)) { + if (FL_TEST(class, FL_SINGLE)) { class = (struct RClass*)class->super; } + while (TYPE(class) == T_ICLASS) { + class = (struct RClass*)class->super; + } + st_foreach(rb_class_tbl, id_find, class); if (find_ok) { return rb_id2name((ID)find_ok); @@ -3,7 +3,7 @@ process.c - $Author: matz $ - $Date: 1994/11/01 08:28:14 $ + $Date: 1994/12/06 09:30:11 $ created at: Tue Aug 10 14:30:50 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -811,6 +811,38 @@ Fproc_setuid(obj, id) } static VALUE +Fproc_getgid(obj) + VALUE obj; +{ + int gid = getgid(); + return INT2FIX(gid); +} + +static VALUE +Fproc_setgid(obj, id) + VALUE obj, id; +{ + int gid; + + gid = NUM2INT(id); +#ifdef HAS_SETRGID + setrgid((GIDTYPE)gid); +#else +#ifdef HAVE_SETREGID + setregid(gid, -1); +#else + { + if (getegid() == gid) + setgid(gid); + else + Fail("getrgid not implemented"); + } +#endif +#endif + return INT2FIX(gid); +} + +static VALUE Fproc_geteuid(obj) VALUE obj; { @@ -822,11 +854,50 @@ static VALUE Fproc_seteuid(obj, euid) VALUE obj, euid; { - if (seteuid(NUM2INT(euid)) == -1) - rb_sys_fail(Qnil); +#ifdef HAVE_SETEUID + if (seteuid(NUM2INT(euid)) == -1) rb_sys_fail(Qnil); +#else +#ifdef HAVE_SETREUID + if (setreuid(-1, NUM2INT(euid)) == -1) rb_sys_fail(Qnil); +#else + euid = NUM2INT(euid); + if (euid == getuid()) + setuid(euid); + else + Fail("seteuid() not implemented"); +#endif +#endif return euid; } +static VALUE +Fproc_getegid(obj) + VALUE obj; +{ + int egid = getegid(); + return INT2FIX(egid); +} + +static VALUE +Fproc_setegid(obj, egid) + VALUE obj, egid; +{ +#ifdef HAVE_SETEGID + if (setegid(NUM2INT(egid)) == -1) rb_sys_fail(Qnil); +#else +#ifdef HAVE_SETREGID + if (setregid(-1, NUM2INT(egid)) == -1) rb_sys_fail(Qnil); +#else + egid = NUM2INT(egid); + if (egid == getgid()) + setgid(egid); + else + Fail("setegid() not implemented"); +#endif +#endif + return egid; +} + VALUE rb_readonly_hook(); VALUE M_Process; @@ -869,6 +940,10 @@ Init_process() rb_define_module_function(M_Process, "uid", Fproc_getuid, 0); rb_define_module_function(M_Process, "uid=", Fproc_setuid, 1); + rb_define_module_function(M_Process, "gid", Fproc_getgid, 0); + rb_define_module_function(M_Process, "gid=", Fproc_setgid, 1); rb_define_module_function(M_Process, "euid", Fproc_geteuid, 0); rb_define_module_function(M_Process, "euid=", Fproc_seteuid, 1); + rb_define_module_function(M_Process, "egid", Fproc_getegid, 0); + rb_define_module_function(M_Process, "egid=", Fproc_setegid, 1); } @@ -3,7 +3,7 @@ range.c - $Author: matz $ - $Date: 1994/10/14 06:19:39 $ + $Date: 1994/12/06 09:30:12 $ created at: Thu Aug 19 17:46:47 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -17,8 +17,8 @@ VALUE C_Range; static ID next, eq; -VALUE -range_new(class, start, end) +static VALUE +Srng_new(class, start, end) VALUE class, start, end; { VALUE obj; @@ -35,6 +35,13 @@ range_new(class, start, end) return obj; } +VALUE +range_new(start, end) + VALUE start, end; +{ + return Srng_new(C_Range, start, end); +} + static VALUE Frng_match(rng, obj) VALUE rng, obj; @@ -142,6 +149,7 @@ Init_Range() { C_Range = rb_define_class("Range", C_Object); rb_include_module(C_Range, M_Enumerable); + rb_define_single_method(C_Range, "new", Srng_new, 2); rb_define_method(C_Range, "=~", Frng_match, 1); rb_define_method(C_Range, "each", Frng_each, 0); rb_define_method(C_Range, "start", Frng_start, 0); @@ -3,7 +3,7 @@ re.c - $Author: matz $ - $Date: 1994/11/01 08:28:21 $ + $Date: 1994/12/06 09:30:14 $ created at: Mon Aug 9 18:24:49 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -135,6 +135,9 @@ research(reg, str, start, ignorecase) { int result; + if (FL_TEST(reg, FL_USER0)) { /* case-flag set for the object */ + ignorecase = FL_TEST(reg, FL_USER1); /* case-flag */ + } if (ignorecase) reg->ptr->pat.translate = casetable; else @@ -149,10 +152,8 @@ research(reg, str, start, ignorecase) struct match *data; int beg, i; - obj = (struct RData*)newdata(sizeof(struct match)); - OBJSETUP(obj, C_Data, T_DATA); - obj->dfree = free_match; - data = (struct match*)DATA_PTR(obj); + data = ALLOC(struct match); + obj = (struct RData*)data_new(data, free_match, Qnil); data->len = str->len; data->ptr = ALLOC_N(char, str->len+1); @@ -350,29 +351,38 @@ Freg_match2(re) } static VALUE -Freg_compile(re, str) - VALUE re; - struct RString *str; +Sreg_new(argc, argv) + int argc; + VALUE *argv; { - Check_Type(str, T_STRING); - return regexp_new_1(re, str->ptr, str->ptr); -} + VALUE src, reg; -static VALUE -Freg_new(re, src) - VALUE re, src; -{ + if (argc == 0 || argc > 2) { + Fail("wrong # of argument"); + } + + src = argv[0]; switch (TYPE(src)) { case T_STRING: - return regexp_new_1(re, RREGEXP(src)->ptr, RREGEXP(src)->len); + reg = regexp_new_1(Qself, RREGEXP(src)->ptr, RREGEXP(src)->len); case T_REGEXP: - return regexp_new_1(re, RREGEXP(src)->str, RREGEXP(src)->len); + reg = regexp_new_1(Qself, RREGEXP(src)->str, RREGEXP(src)->len); default: - Check_Type(src, T_REGEXP); + Check_Type(src, T_STRING); } - /* not reached */ + + if (argc == 2) { + FL_SET(reg, FL_USER0); + if (argv[1]) { + FL_SET(reg, FL_USER1); + } + else { + FL_UNSET(reg, FL_USER1); + } + } + return Qnil; } @@ -431,8 +441,10 @@ re_regsub(str) } if (val == Qnil) return (VALUE)str; + if (p < e) { + str_cat(val, p, e-p); + } if (RSTRING(val)->len == 0) { - obj_free(val); /* free for cost */ return (VALUE)str; } return val; @@ -517,8 +529,8 @@ Init_Regexp() rb_define_variable("$=", &ignorecase, Qnil, Qnil); C_Regexp = rb_define_class("Regexp", C_Object); - rb_define_single_method(C_Regexp, "new", Freg_new, 1); - rb_define_single_method(C_Regexp, "compile", Freg_compile, 1); + rb_define_single_method(C_Regexp, "new", Sreg_new, -1); + rb_define_single_method(C_Regexp, "compile", Sreg_new, -1); rb_define_method(C_Regexp, "=~", Freg_match, 1); rb_define_method(C_Regexp, "~", Freg_match2, 0); @@ -25,6 +25,7 @@ On the other hand, if you compile with both -Dtest and -Dcanned you can run some tests we've already thought of. */ +#include "config.h" /* We write fatal error messages on standard error. */ #include <stdio.h> @@ -3,7 +3,7 @@ ruby.c - $Author: matz $ - $Date: 1994/11/01 08:28:24 $ + $Date: 1994/12/06 09:30:15 $ created at: Tue Aug 10 12:47:31 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -18,11 +18,7 @@ #include <sys/stat.h> #include <signal.h> -#ifdef HAVE_GETOPT_LONG -#include <getopt.h> -#else -#include "missing/getopt.h" -#endif +#include "getopt.h" static int version, copyright; @@ -184,7 +180,7 @@ proc_options(argcp, argvp) break; case 'I': - Fary_unshift(rb_load_path, str_new2(optarg)); + ary_unshift(rb_load_path, str_new2(optarg)); break; default: @@ -427,6 +423,6 @@ ruby_init0(argc, argv, envp) rb_define_variable("$*", &Argv, Qnil, Qnil); Argv = ary_new2(argc); for (i=0; i < argc; i++) { - Fary_push(Argv, str_new2(argv[i])); + ary_push(Argv, str_new2(argv[i])); } } @@ -3,7 +3,7 @@ ruby.h - $Author: matz $ - $Date: 1994/10/14 06:19:44 $ + $Date: 1994/12/06 09:30:16 $ created at: Thu Jun 10 14:26:32 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -13,6 +13,7 @@ #ifndef RUBY_H #define RUBY_H +#include "config.h" #include "defines.h" #ifdef __STDC__ @@ -82,15 +83,6 @@ extern VALUE C_Data; #define CLASS_OF(obj) (FIXNUM_P(obj)?C_Fixnum: NIL_P(obj)?C_Nil:\ RBASIC(obj)->class) -#define FL_SINGLE 0x10 -#define FL_MARK 0x20 -#define FL_LITERAL 0x40 - -#define FL_ABLE(x) (!(FIXNUM_P(x)||NIL_P(x))) -#define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0) -#define FL_SET(x,f) if (FL_ABLE(x)) {RBASIC(x)->flags |= (f);} -#define FL_UNSET(x,f) if(FL_ABLE(x)){RBASIC(x)->flags &= ~(f);} - #define T_NIL 0x0 #define T_OBJECT 0x1 #define T_CLASS 0x2 @@ -180,6 +172,7 @@ struct RData { #define DATA_PTR(dta) (RDATA(dta)->data) +VALUE data_new(); VALUE rb_ivar_get_1(); VALUE rb_ivar_set_1(); @@ -191,11 +184,9 @@ VALUE rb_ivar_set_1(); } #define Make_Data_Struct(obj, iv, type, mark, free, sval) {\ - struct RData *_new_;\ - _new_ = (struct RData*)newdata(sizeof(type));\ - _new_->dmark = (void (*)())(mark);\ - _new_->dfree = (void (*)())(free);\ - sval = (type*)DATA_PTR(_new_);\ + VALUE _new_;\ + sval = ALLOC(type);\ + _new_ = data_new(sval,free,mark);\ memset(sval, 0, sizeof(type));\ rb_ivar_set_1(obj, iv, _new_);\ } @@ -230,6 +221,20 @@ struct RBignum { #define RSTRUCT(obj) (R_CAST(RStruct)(obj)) #define RBIGNUM(obj) (R_CAST(RBignum)(obj)) +#define FL_SINGLE (1<<4) +#define FL_MARK (1<<5) +#define FL_LITERAL (1<<6) + +#define FL_USER0 (1<<7) +#define FL_USER1 (1<<8) +#define FL_USER2 (1<<9) +#define FL_USER3 (1<<10) + +#define FL_ABLE(x) (!(FIXNUM_P(x)||NIL_P(x))) +#define FL_TEST(x,f) (FL_ABLE(x)?(RBASIC(x)->flags&(f)):0) +#define FL_SET(x,f) if (FL_ABLE(x)) {RBASIC(x)->flags |= (f);} +#define FL_UNSET(x,f) if(FL_ABLE(x)){RBASIC(x)->flags &= ~(f);} + extern VALUE rb_self(); #define Qself rb_self() #define Qnil (VALUE)0 diff --git a/sample/Artistic b/sample/Artistic deleted file mode 100644 index fbf7989775..0000000000 --- a/sample/Artistic +++ /dev/null @@ -1,117 +0,0 @@ - - - - - The "Artistic License" - - Preamble - -The intent of this document is to state the conditions under which a -Package may be copied, such that the Copyright Holder maintains some -semblance of artistic control over the development of the package, -while giving the users of the package the right to use and distribute -the Package in a more-or-less customary fashion, plus the right to make -reasonable modifications. - -Definitions: - - "Package" refers to the collection of files distributed by the - Copyright Holder, and derivatives of that collection of files - created through textual modification. - - "Standard Version" refers to such a Package if it has not been - modified, or has been modified in accordance with the wishes - of the Copyright Holder. - - "Copyright Holder" is whoever is named in the copyright or - copyrights for the package. - - "You" is you, if you're thinking about copying or distributing - this Package. - - "Reasonable copying fee" is whatever you can justify on the - basis of media cost, duplication charges, time of people involved, - and so on. (You will not be required to justify it to the - Copyright Holder, but only to the computing community at large - as a market that must bear the fee.) - - "Freely Available" means that no fee is charged for the item - itself, though there may be fees involved in handling the item. - It also means that recipients of the item may redistribute it - under the same conditions they received it. - -1. You may make and give away verbatim copies of the source form of the -Standard Version of this Package without restriction, provided that you -duplicate all of the original copyright notices and associated disclaimers. - -2. You may apply bug fixes, portability fixes and other modifications -derived from the Public Domain or from the Copyright Holder. A Package -modified in such a way shall still be considered the Standard Version. - -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and -when you changed that file, and provided that you do at least ONE of the -following: - - a) place your modifications in the Public Domain or otherwise make them - Freely Available, such as by posting said modifications to Usenet or - an equivalent medium, or placing the modifications on a major archive - site such as uunet.uu.net, or by allowing the Copyright Holder to include - your modifications in the Standard Version of the Package. - - b) use the modified Package only within your corporation or organization. - - c) rename any non-standard executables so the names do not conflict - with standard executables, which must also be provided, and provide - a separate manual page for each non-standard executable that clearly - documents how it differs from the Standard Version. - - d) make other distribution arrangements with the Copyright Holder. - -4. You may distribute the programs of this Package in object code or -executable form, provided that you do at least ONE of the following: - - a) distribute a Standard Version of the executables and library files, - together with instructions (in the manual page or equivalent) on where - to get the Standard Version. - - b) accompany the distribution with the machine-readable source of - the Package with your modifications. - - c) accompany any non-standard executables with their corresponding - Standard Version executables, giving the non-standard executables - non-standard names, and clearly documenting the differences in manual - pages (or equivalent), together with instructions on where to get - the Standard Version. - - d) make other distribution arrangements with the Copyright Holder. - -5. You may charge a reasonable copying fee for any distribution of this -Package. You may charge any fee you choose for support of this Package. -You may not charge a fee for this Package itself. However, -you may distribute this Package in aggregate with other (possibly -commercial) programs as part of a larger (possibly commercial) software -distribution provided that you do not advertise this Package as a -product of your own. - -6. The scripts and library files supplied as input to or produced as -output from the programs of this Package do not automatically fall -under the copyright of this Package, but belong to whomever generated -them, and may be sold commercially, and may be aggregated with this -Package. - -7. C subroutines supplied by you and linked into this Package in order -to emulate subroutines and variables of the language defined by this -Package shall not be considered part of this Package, but are the -equivalent of input as in Paragraph 6, provided these subroutines do -not change the language in any way that would cause it to fail the -regression tests for the language. - -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. - -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - The End diff --git a/sample/aset.rb b/sample/aset.rb index cfec649ac3..414c13ba70 100644 --- a/sample/aset.rb +++ b/sample/aset.rb @@ -1,3 +1,7 @@ +# array set example +# output: +# 07045 + ary = [0, 0, 4, 5] ary[1, 0] = [7] -print(ary, "\n") +print ary, "\n" diff --git a/sample/attr.rb b/sample/attr.rb index 2db79f1ae5..83265295f3 100644 --- a/sample/attr.rb +++ b/sample/attr.rb @@ -1,9 +1,14 @@ +# attribute access example +# output: +# 10 +# #<Foo: @test=10> + class Foo - attr("test", %TRUE) + attr "test", %TRUE end foo = Foo.new foo.test = 10 -print(foo.test, "\n") +print foo.test, "\n" foo._inspect.print -print("\n") +print "\n" diff --git a/sample/biorhythm.rb b/sample/biorhythm.rb deleted file mode 100644 index eb14ca7365..0000000000 --- a/sample/biorhythm.rb +++ /dev/null @@ -1,201 +0,0 @@ -#!/mp/free/bin/ruby -# -# biorhythm.rb - -# $Release Version: $ -# $Revision: 1.6 $ -# $Date: 1994/02/24 10:23:34 $ -# by Yasuo OHBA(STAFS Development Room) -# -# -- -# -# -# - -$RCS_ID="$Header: /var/ohba/RCS/biorhythm.rb,v 1.6 1994/02/24 10:23:34 ohba Exp ohba $" - -include Math -load("parsearg.rb") - -$wochentag = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] -monatstag1 = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] -monatstag2 = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] - -def usage() - print("Usage:\n") - print("biorhythm.rb [options]\n") - print(" options...\n") - print(" -D YYYYMMDD(birthday) : ���٤� default �ͤ�Ȥ�. \n") - print(" --sdate | --date YYYYMMDD : system date �⤷���ϻ��ꤷ�����դ�Ȥ�.\n") - print(" --birthday YYYYMMDD : �������λ����. \n") - print(" -v | -g : Values or Graph �λ���. \n") - print(" --days DAYS : ���֤λ����(Graph �λ��Τ�ͭ��). \n") - print(" --help : help\n") -end -$USAGE = 'usage' - -def leapyear(y) - ta = 0 - if ((y % 4.0) == 0); ta = 1; end - if ((y % 100.0) == 0); ta = 0; end - if ((y % 400.0) == 0); ta = 1; end - return ta -end - -def bcalc(tt, m, j) - ta = 0 - if (m <= 2) - ta = (m - 1) * 31 - else - ta = leapyear(j) - ta = ta + ((306 * m - 324) / 10.0).to_i - end - ta = ta + (j - 1) * 365 + ((j - 1) / 4.0).to_i - ta = ta - ((j - 1) / 100) + ((j - 1) / 400.0).to_i - ta = ta + tt - return ta -end - -def printHeader(tg, mg, jg, gtag, tage) - print("\n") - print(" Biorhythm\n") - print(" =========\n") - print("\n") - printf("The birthday %04d.%02d.%02d is a %s\n", jg, mg, tg, $wochentag[gtag]) - printf("Age in days: [%d]\n", tage) -end - -def getPosition(z) - pi = 3.14159265 - $phys = (50.0 * (1.0 + sin((z / 23.0 - (z / 23)) * 360.0 * pi / 180.0))).to_i - $emot = (50.0 * (1.0 + sin((z / 28.0 - (z / 28)) * 360.0 * pi / 180.0))).to_i - $geist =(50.0 * (1.0 + sin((z / 33.0 - (z / 33)) * 360.0 * pi / 180.0))).to_i -end - -# -# main program -# -parseArgs(0, nil, "vg", "D:", "sdate", "date:", "birthday:", "days:") - -printf($stderr, "\n") -printf($stderr, "Biorhythm (c) 1987-1994 V3.0\n") -printf($stderr, "\n") -if ($OPT_D) - dtmp = Time.now.strftime("%Y%m%d") - jh = dtmp[0,4].to_i - mh = dtmp[4,2].to_i - th = dtmp[6,2].to_i - dtmp = $OPT_D - jg = dtmp[0,4].to_i - mg = dtmp[4,2].to_i - tg = dtmp[6,2].to_i - gtag = bcalc(tg, mg, jg) % 7 - ausgabeart = "g" -else - if ($OPT_birthday) - dtmp = $OPT_birthday - else - printf($stderr, "Birthday (YYYYMMDD) : ") - dtmp = $stdin.gets.chop - end - if (dtmp.length != 8) - printf($stderr, "BAD Input Birthday!!\n") - exit() - end - jg = dtmp[0,4].to_i - mg = dtmp[4,2].to_i - tg = dtmp[6,2].to_i - - gtag = bcalc(tg, mg, jg) % 7 - - if ($OPT_sdate) - dtmp = Time.now.strftime("%Y%m%d") - elsif ($OPT_date) - dtmp = $OPT_date - else - printf($stderr, "Date [<RETURN> for Systemdate] (YYYYMMDD) : ") - dtmp = $stdin.gets.chop - end - if (dtmp.length != 8) - dtmp = Time.now.strftime("%Y%m%d") - end - jh = dtmp[0,4].to_i - mh = dtmp[4,2].to_i - th = dtmp[6,2].to_i - - if ($OPT_v) - ausgabeart = "v" - elsif ($OPT_g) - ausgabeart = "g" - else - printf($stderr, "Values for today or Graph (v/g) [default g] : ") - ausgabeart = $stdin.gets.chop - end -end -if (ausgabeart == "v") - tag = bcalc(tg, mg, jg) - tah = bcalc(th, mh, jh) - tage = tah - tag - printHeader(tg, mg, jg, gtag, tage) - print("\n") - - getPosition(tage) - printf("Biorhythm: %04d.%02d.%02d\n", jh, mh, th) - printf("Physical: %d%%\n", $phys) - printf("Emotional: %d%%\n", $emot) - printf("Mental: %d%%\n", $geist) - print("\n") -else - if ($OPT_days) - ktage = $OPT_days.to_i - else - if ($OPT_D) - ktage = 9 - else - printf($stderr, "Graph for how many days [default 10] : ") - ktage = $stdin.gets.chop - if (ktage == "") - ktage = 9 - else - ktage = ktage.to_i - 1 - end - end - end - tag = bcalc(tg, mg, jg) - tah = bcalc(th, mh, jh) - tage = tah - tag - printHeader(tg, mg, jg, gtag, tage) - print(" P=physical, E=emotional, M=mental\n") - print(" -------------------------+-------------------------\n") - print(" Bad Condition | Good Condition\n") - print(" -------------------------+-------------------------\n") - - for z in tage..(tage + ktage) - getPosition(z) - - printf("%04d.%02d.%02d : ", jh, mh, th) - p = ($phys / 2.0 + 0.5).to_i - e = ($emot / 2.0 + 0.5).to_i - g = ($geist / 2.0 + 0.5).to_i - graph = "." * 51 - graph[25] = ?| - graph[p] = ?P - graph[e] = ?E - graph[g] = ?M - print(graph, "\n") - th = th + 1 - if (leapyear(jh) == 0) - $MONATSTAG = monatstag1 - else - $MONATSTAG = monatstag2 - end - if (th > $MONATSTAG[mh - 1]) - mh = mh + 1 - th = 1 - end - if (mh > 12) - jh = jh + 1 - mh = 1 - end - end - print(" -------------------------+-------------------------\n\n") -end diff --git a/sample/case.rb b/sample/case.rb index f456f023d3..e844cddfd6 100644 --- a/sample/case.rb +++ b/sample/case.rb @@ -1,12 +1,14 @@ +# case statement example +# output: +# 3..5 case "t" when /1/ - print(1, "\n") + print 1, "\n" when /t/ - print(3..5, "\n") + print 3..5, "\n" when /./ - print(2, "\n") + print 2, "\n" else - print("else\n") + print "else\n" end - diff --git a/sample/cat.rb b/sample/cat.rb index 93f028906a..a3243d308d 100644 --- a/sample/cat.rb +++ b/sample/cat.rb @@ -1,3 +1,4 @@ +# cat -n & `...' operator test while gets() if $. == 1 ... ~ /^\*/; print("--") end printf("%5d: %s", $., $_) diff --git a/sample/cat2.rb b/sample/cat2.rb index f979dc53cb..bbc1ebb0ff 100644 --- a/sample/cat2.rb +++ b/sample/cat2.rb @@ -1,3 +1,4 @@ +# cat -n & `...' operator test while gets() if 1 ... /^\*/; print("--") end printf("%5d: %s", $., $_) diff --git a/sample/cbreak.rb b/sample/cbreak.rb index 5befd5066a..6d3d551569 100644 --- a/sample/cbreak.rb +++ b/sample/cbreak.rb @@ -1,3 +1,5 @@ +# ioctl example works on Sun + %CBREAK = 0x00000002 %ECHO = 0x00000008 %TIOCGETP = 0x40067408 diff --git a/sample/clnt.rb b/sample/clnt.rb index 639e2a0daf..a687d12211 100644 --- a/sample/clnt.rb +++ b/sample/clnt.rb @@ -1,3 +1,5 @@ +# socket example - client side +# usage: ruby clnt.rb [host] port host=(if $ARGV.length == 2; $ARGV.shift; else "localhost"; end) print("Trying ", host, " ...") $stdout.flush diff --git a/sample/clone.rb b/sample/clone.rb index 6a752e8ab5..69d2f1d52b 100644 --- a/sample/clone.rb +++ b/sample/clone.rb @@ -1,3 +1,9 @@ +# object cloning & single method test +# output: +# test2 +# test +# test +# clone.rb:13: undefined method `test2' for "#<Object: 0xbfca4>"(Object) foo = Object.new def foo.test print("test\n") diff --git a/sample/const.rb b/sample/const.rb index d7629fe8e1..783965cfd5 100644 --- a/sample/const.rb +++ b/sample/const.rb @@ -1,3 +1,7 @@ +# constant access test +# output: +# 1234 +# 1268 %test1 = 1 %test2 = 2 diff --git a/sample/dbm.rb b/sample/dbm.rb index 128391faec..cdec665a79 100644 --- a/sample/dbm.rb +++ b/sample/dbm.rb @@ -1,6 +1,4 @@ -# ruby -# - +# ruby dbm acess d = DBM.open("test") -for k in d.keys; print(k, "\n"); end -for v in d.values; print(v, "\n"); end +for k in d.keys; print k, "\n"; end +for v in d.values; print v, "\n"; end diff --git a/sample/dir.rb b/sample/dir.rb index f4c3d17c11..f269c568ba 100644 --- a/sample/dir.rb +++ b/sample/dir.rb @@ -1,9 +1,10 @@ +# directory access +# list all files but .*/*~/*.o dirp = Dir.open(".") dirp.rewind for f in dirp - if (~/^\./ || ~/~$/ || ~/\.o/) - else - print(f, "\n") + unless (~/^\./ || ~/~$/ || ~/\.o/) + print f, "\n" end end dirp.close diff --git a/sample/evaldef.rb b/sample/evaldef.rb index c261b53068..021f65800a 100644 --- a/sample/evaldef.rb +++ b/sample/evaldef.rb @@ -1,3 +1,8 @@ +# method definition by eval() +# output: +# bar +# (eval):21: method `baz' not available for "#<foo: 0xbfc5c>"(foo) + class foo def foo eval(" diff --git a/sample/export.rb b/sample/export.rb index 3a6a8198df..ea6c5aeaeb 100644 --- a/sample/export.rb +++ b/sample/export.rb @@ -1,3 +1,8 @@ +# methos access permission +# output: +# foobar +# foo + class foo export(\printf) end diff --git a/sample/fib.rb b/sample/fib.rb index 9fb8b24697..cde4fba082 100644 --- a/sample/fib.rb +++ b/sample/fib.rb @@ -1,3 +1,5 @@ +# calculate Fibonacci(20) +# for benchmark def fib(n) if n<2 n diff --git a/sample/freq.rb b/sample/freq.rb index 7417e0b5a4..0c433ae25a 100644 --- a/sample/freq.rb +++ b/sample/freq.rb @@ -1,5 +1,5 @@ -# - +# word occurrence listing +# usege: ruby freq.rb file.. freq = {} while gets() while sub(/\w+/, '') diff --git a/sample/gctest.rb b/sample/gctest.rb index 23476d2b78..6810b95481 100644 --- a/sample/gctest.rb +++ b/sample/gctest.rb @@ -1,3 +1,4 @@ +# GC stress test def cons(car, cdr) [car, cdr] end diff --git a/sample/hash.rb b/sample/hash.rb index 126b17dfe4..85f719e7eb 100644 --- a/sample/hash.rb +++ b/sample/hash.rb @@ -1,3 +1,10 @@ +# hash value +# output: +# 78651 +# 78651 +# 78651 +# -45637 + print(+-1.0.hash,"\n") print(-1.0.hash,"\n") print((-1.0).hash,"\n") diff --git a/sample/io.rb b/sample/io.rb index 0b8a537ef4..c3c1a47b28 100644 --- a/sample/io.rb +++ b/sample/io.rb @@ -1,3 +1,6 @@ +# IO test +# usage: ruby io.rb file.. + home = getenv("HOME") home.sub("m", "&&") print(home, "\n") diff --git a/sample/less.rb b/sample/less.rb index e818e7a2ba..6960b9c03d 100755 --- a/sample/less.rb +++ b/sample/less.rb @@ -1,17 +1,4 @@ -#! /mp/free/bin/ruby -- -*- ruby -*- -# -# less - -# $Release Version: $ -# $Revision: 1.1 $ -# $Date: 90/09/29 15:17:59 $ -# by Yasuo OHBA(STAFS Development Room) -# -# -- -# -# -# - -$RCS_ID="$Header: less,v 1.1 90/09/29 15:17:59 ohba Locked $" +#! /usr/local/bin/ruby -- -*- ruby -*- ZCAT = "/usr/local/bin/zcat" LESS = "/usr/local/bin/less" diff --git a/sample/list.rb b/sample/list.rb index e0b5b383b0..1a20c954d0 100644 --- a/sample/list.rb +++ b/sample/list.rb @@ -1,10 +1,16 @@ -# Linked list program +# Linked list example class MyElem + #���饹��å�(����)����� def MyElem.new(item) - super.init(item) + # �����ѡ����饹�Υ�åɤθƤӽФ�(���ξ��ϥ��饹Class) + elm = super # �ѿ�������פ�ʤ� + #elm���Ф����åɤθƤӽФ� + elm.init(item) end - + + # �̾�Υ�å���� def init(item) + # @�ѿ��ϥ������ѿ�(������פ�ʤ�) @data = item @next = nil self @@ -18,6 +24,7 @@ class MyElem @next end + # ��obj.data = val�פȤ����Ȥ��˰��ۤ˸ƤФ���å� def next=(new) @next = new end @@ -42,9 +49,12 @@ class MyList end end + # ���֥������Ȥ�ʸ������Ѵ������å� + # ��������������print�Ǥ�ɽ�����Ѥ�� def to_s str = "<MyList:\n"; for elt in self + # ��str = str + elt.data.to_s + "\n"�פξ�ά�� str += elt.data.to_s + "\n" end str += ">" @@ -66,16 +76,18 @@ class Point sprintf("%d@%d", @x, @y) end end - -list1 = MyList.new -list1.add_to_list(10) -list1.add_to_list(20) -list1.add_to_list(Point.new(2, 3)) -list1.add_to_list(Point.new(4, 5)) -list2 = MyList.new -list2.add_to_list(20) -list2.add_to_list(Point.new(4, 5)) -list2.add_to_list(list1) -print("list1:\n", list1, "\n") -print("list2:\n", list2, "\n") +# ����ѿ���`$'�ǻϤޤ롥 +$list1 = MyList.new +$list1.add_to_list(10) +$list1.add_to_list(20) +$list1.add_to_list(Point.new(2, 3)) +$list1.add_to_list(Point.new(4, 5)) +$list2 = MyList.new +$list2.add_to_list(20) +$list2.add_to_list(Point.new(4, 5)) +$list2.add_to_list($list1) + +# ۣ��Ǥʤ��¤��åɸƤӽФ��γ�̤Ͼ�ά�Ǥ��� +print "list1:\n", $list1, "\n" +print "list2:\n", $list2, "\n" diff --git a/sample/list2.rb b/sample/list2.rb index c2e9bca753..fef9d35a84 100644 --- a/sample/list2.rb +++ b/sample/list2.rb @@ -1,4 +1,4 @@ -# Linked list program -- short version +# Linked list example -- short version class Point def Point.new(x, y) super.init(x, y) diff --git a/sample/list3.rb b/sample/list3.rb index c38e5bfb43..c6278574bf 100644 --- a/sample/list3.rb +++ b/sample/list3.rb @@ -1,4 +1,6 @@ -# Linked list program -- short version +# Linked list example -- short version +# using _inspect + class Point def Point.new(x, y) super.init(x, y) diff --git a/sample/math.rb b/sample/math.rb index 83be1b9048..c0b5225080 100644 --- a/sample/math.rb +++ b/sample/math.rb @@ -1,4 +1,4 @@ -#load("lib/math.o") +# math example include Math sqrt(4) print(Math.sqrt(257), "\n") diff --git a/sample/mpart.rb b/sample/mpart.rb index c0f705ef8e..2374ae0938 100755 --- a/sample/mpart.rb +++ b/sample/mpart.rb @@ -1,4 +1,6 @@ #! ./ruby +# split into multi part +# usage: mpart.rb [-nnn] file.. lines = 1000 diff --git a/sample/newver.rb b/sample/newver.rb deleted file mode 100644 index bbf03aebc2..0000000000 --- a/sample/newver.rb +++ /dev/null @@ -1,13 +0,0 @@ -#! /usr/local/bin/ruby - -f = open("version.h", "r") -f.gets() -f.close - -if $_ =~ /"(\d)\.(\d+)"/; - f = open("version.h", "w") - i = $2.to_i + 1 - printf("ruby version %d.%0d\n", $1, i) - printf(f, "#define RUBY_VERSION \"%d.%0d\"\n", $1, i) - f.close -end diff --git a/sample/occur.rb b/sample/occur.rb index 12e469d20a..2141fade38 100644 --- a/sample/occur.rb +++ b/sample/occur.rb @@ -1,3 +1,5 @@ +# word occurrence listing +# usege: ruby occur.rb file.. freq = {} while gets() for word in $_.split(/\W+/) diff --git a/sample/occur2.rb b/sample/occur2.rb index 6e0513707c..899294ea37 100644 --- a/sample/occur2.rb +++ b/sample/occur2.rb @@ -1,3 +1,5 @@ +# word occurrence listing +# usege: ruby occur2.rb file.. freq = {} while gets() for word in $_.split(/\W+/) diff --git a/sample/opt_s.rb b/sample/opt_s.rb index 5402be7482..56ff0eea15 100644 --- a/sample/opt_s.rb +++ b/sample/opt_s.rb @@ -1,4 +1,6 @@ -#! ruby -s +#! ./ruby -s +# test for option `-s' + if ($xyz) print("xyz = TRUE\n") end diff --git a/sample/opt_x.rb b/sample/opt_x.rb index 4fc9a25276..47a67f6cfa 100644 --- a/sample/opt_x.rb +++ b/sample/opt_x.rb @@ -1,7 +1,9 @@ +test for option `-x' + this is a forwarding header this is a header too. - #! ruby -this is a trailing + +from here script starts #! ./ruby -v print("tt\n") __END__ diff --git a/sample/perror.rb b/sample/perror.rb deleted file mode 100644 index 9196525ee3..0000000000 --- a/sample/perror.rb +++ /dev/null @@ -1,7 +0,0 @@ -if File._s("io.rb") - print(File._z("io.rb", "io.rb\n") -# print(File._s("io.rb"), ": io.rb\n") -end - -for i in 1..5 -end diff --git a/sample/rcs.awk b/sample/rcs.awk deleted file mode 100644 index 08979285c9..0000000000 --- a/sample/rcs.awk +++ /dev/null @@ -1,33 +0,0 @@ -BEGIN { - sw = 40.0; - dw = 78.0; - hdw = dw / 2.0; - w = 20.0; - h =1.0; - d = 0.2; - ss="abcdefghijklmnopqrstuvwxyz0123456789!#$%^&*()-=\\[];'`,./"; - rnd = srand(); -} - -{ - xr = -hdw; y = h * 1.0; maxxl = -999; - s = ""; - while (xr < hdw) { - x = xr * (1 + y) - y * w / 2; - i = (x / (1 + h) + sw /2); - c = (0 < i && i < length($0)) ? substr($0, i, 1) : "0"; - y = h - d * c; - xl = xr - w * y / (1 + y); - if (xl < -hdw || xl >= hdw || xl <= maxxl) { - t = rand() * length(ss); - c = substr(ss, t, 1); - } - else { - c = substr(s, xl + hdw, 1); - maxxl = xl; - } - s = s c; - xr = xr + 1; - } - print s; -} diff --git a/sample/rcs.dat b/sample/rcs.dat deleted file mode 100644 index 61c88bff89..0000000000 --- a/sample/rcs.dat +++ /dev/null @@ -1,17 +0,0 @@ -0000000000000000220000000000000000 -0000000000000111221110000000000000 -0000000000111112222111110000000000 -0000000111111112222111111110000000 -0000111111111122222211111111110000 -0111111111111222222221111111111110 -2222222222222222222222222222222222 -1122222222222222222222222222222211 -0111122222222222222222222222211110 -0011111122222222222222222211111100 -0001111111222222222222221111111000 -0000111112222222222222222111110000 -0000011122222222112222222211100000 -0000001122222221111222222211000000 -0000000122221111111111222210000000 -0000000221111111111111111220000000 -0000000000000000000000000000000000 diff --git a/sample/rcs.rb b/sample/rcs.rb deleted file mode 100644 index 0ed4a36c1e..0000000000 --- a/sample/rcs.rb +++ /dev/null @@ -1,46 +0,0 @@ -sw = 40.0 # ���̃p�^�[���̕� -dw = 78.0 # ��������� Random Character Streogram �̕� -hdw = dw / 2.0 -w = 20.0 # ����̕� -h =1.0 # ��ʂƊ�ʂ̋��� -d = 0.2 # �P�ʓ�����̕����オ��� -ss="abcdefghijklmnopqrstuvwxyz0123456789!#$%^&*()-=\\[];'`,./" -rnd = srand() - -while gets() -# print($_) - xr = -hdw; y = h * 1.0; maxxl = -999 - s = ""; - while xr < hdw - x = xr * (1 + y) - y * w / 2 - i = (x / (1 + h) + sw /2) - if (1 < i && i < $_.length); - c = $_[i, 1].to_i - else - c = 0 - end - y = h - d * c - xl = xr - w * y / (1 + y); - if xl < -hdw || xl >= hdw || xl <= maxxl - tt = rand(ss.length) - c = ss[tt, 1] - else - c = s[xl + hdw, 1] - maxxl = xl - end - s = s + c - xr = xr + 1 - end - print(s, "\n") -end - - - - - - - - - - - diff --git a/sample/reach.rb b/sample/reach.rb deleted file mode 100644 index 25b340887d..0000000000 --- a/sample/reach.rb +++ /dev/null @@ -1,5 +0,0 @@ -for i in 1..10 - print("test\n") - break - print("test2\n") -end diff --git a/sample/resp.rb b/sample/resp.rb deleted file mode 100644 index 84516b4c78..0000000000 --- a/sample/resp.rb +++ /dev/null @@ -1,2 +0,0 @@ -undef kill -print(responds_to("kill"), "\n") diff --git a/sample/samp.rb b/sample/samp.rb index b4d818faba..4052a308c1 100644 --- a/sample/samp.rb +++ b/sample/samp.rb @@ -1,3 +1,6 @@ +# �S�p�������܂ރX�N���v�g +# �g����: samp.rb file.. + �P�� = 0 while gets() printf("%3d: %s", $., $_) diff --git a/sample/sieve.rb b/sample/sieve.rb index 0228243fda..192a5865d8 100644 --- a/sample/sieve.rb +++ b/sample/sieve.rb @@ -1,3 +1,4 @@ +# sieve of Eratosthenes sieve = [] unless max = $ARGV.shift; max = 100; end max = max.to_i diff --git a/sample/split.rb b/sample/split.rb index 737173635e..2b6f3921ce 100644 --- a/sample/split.rb +++ b/sample/split.rb @@ -1,3 +1,4 @@ +# split test print("1 byte string", "\n") print("1 byte string".reverse, "\n") diff --git a/sample/struct.rb b/sample/struct.rb index 7c0690b627..322764d02f 100644 --- a/sample/struct.rb +++ b/sample/struct.rb @@ -1,3 +1,7 @@ +#output: +# struct test +# 1 + foo = Struct.new("test", "a1"::1, "a2"::2) print(foo, "\n") bar = foo.clone diff --git a/sample/svr.rb b/sample/svr.rb index c00a03c8cf..1c0104cc40 100644 --- a/sample/svr.rb +++ b/sample/svr.rb @@ -1,3 +1,6 @@ +# socket example - server side +# usage: ruby svr.rb + gs = TCPserver.open(0) printf("server port is on %d\n", gs.port) socks = [gs] diff --git a/sample/system.rb b/sample/system.rb index 1693d905b4..02f3782b39 100644 --- a/sample/system.rb +++ b/sample/system.rb @@ -1 +1,2 @@ +# command string print(`echo foobar`) @@ -3,7 +3,7 @@ socket.c - $Author: matz $ - $Date: 1994/11/01 08:28:26 $ + $Date: 1994/12/06 09:30:18 $ created at: Thu Mar 31 12:21:29 JST 1994 ************************************************/ @@ -227,7 +227,7 @@ open_inet(class, h, serv, server) } static VALUE -Ftcp_sock_open(class, host, serv) +Stcp_sock_open(class, host, serv) VALUE class, host, serv; { Check_Type(host, T_STRING); @@ -235,7 +235,7 @@ Ftcp_sock_open(class, host, serv) } static VALUE -Ftcp_svr_open(class, args) +Stcp_svr_open(class, args) VALUE class, args; { VALUE arg1, arg2; @@ -379,7 +379,7 @@ Ftcp_peeraddr(sock) } static VALUE -Funix_sock_open(sock, path) +Sunix_sock_open(sock, path) VALUE sock, path; { return open_unix(sock, path, 0); @@ -403,7 +403,7 @@ Funix_path(sock) } static VALUE -Funix_svr_open(class, path) +Sunix_svr_open(class, path) VALUE class, path; { return open_unix(class, path, 1); @@ -522,7 +522,7 @@ setup_domain_and_type(domain, dv, type, tv) } static VALUE -Fsock_open(class, domain, type, protocol) +Ssock_open(class, domain, type, protocol) VALUE class, domain, type, protocol; { int fd; @@ -535,14 +535,14 @@ Fsock_open(class, domain, type, protocol) } static VALUE -Fsock_for_fd(class, fd) +Ssock_for_fd(class, fd) VALUE class, fd; { return sock_new(class, NUM2INT(fd)); } static VALUE -Fsock_socketpair(class, domain, type, protocol) +Ssock_socketpair(class, domain, type, protocol) VALUE class, domain, type, protocol; { int fd; @@ -706,32 +706,32 @@ Init_Socket () rb_define_method(C_BasicSocket, "getpeername", Fbsock_getpeername, 0); C_TCPsocket = rb_define_class("TCPsocket", C_BasicSocket); - rb_define_single_method(C_TCPsocket, "open", Ftcp_sock_open, 2); - rb_define_single_method(C_TCPsocket, "new", Ftcp_sock_open, 2); + rb_define_single_method(C_TCPsocket, "open", Stcp_sock_open, 2); + rb_define_single_method(C_TCPsocket, "new", Stcp_sock_open, 2); rb_define_method(C_TCPsocket, "addr", Ftcp_addr, 0); rb_define_method(C_TCPsocket, "peeraddr", Ftcp_peeraddr, 0); C_TCPserver = rb_define_class("TCPserver", C_TCPsocket); - rb_define_single_method(C_TCPserver, "open", Ftcp_svr_open, -2); - rb_define_single_method(C_TCPserver, "new", Ftcp_svr_open, -2); + rb_define_single_method(C_TCPserver, "open", Stcp_svr_open, -2); + rb_define_single_method(C_TCPserver, "new", Stcp_svr_open, -2); rb_define_method(C_TCPserver, "accept", Ftcp_accept, 0); C_UNIXsocket = rb_define_class("UNIXsocket", C_BasicSocket); - rb_define_single_method(C_UNIXsocket, "open", Funix_sock_open, 1); - rb_define_single_method(C_UNIXsocket, "new", Funix_sock_open, 1); + rb_define_single_method(C_UNIXsocket, "open", Sunix_sock_open, 1); + rb_define_single_method(C_UNIXsocket, "new", Sunix_sock_open, 1); rb_define_method(C_UNIXsocket, "path", Funix_path, 0); rb_define_method(C_UNIXsocket, "addr", Funix_addr, 0); rb_define_method(C_UNIXsocket, "peeraddr", Funix_peeraddr, 0); C_UNIXserver = rb_define_class("UNIXserver", C_UNIXsocket); - rb_define_single_method(C_UNIXserver, "open", Funix_svr_open, 1); - rb_define_single_method(C_UNIXserver, "new", Funix_svr_open, 1); + rb_define_single_method(C_UNIXserver, "open", Sunix_svr_open, 1); + rb_define_single_method(C_UNIXserver, "new", Sunix_svr_open, 1); rb_define_method(C_UNIXserver, "accept", Funix_accept, 0); C_Socket = rb_define_class("Socket", C_BasicSocket); - rb_define_single_method(C_Socket, "open", Fsock_open, 3); - rb_define_single_method(C_Socket, "new", Fsock_open, 3); - rb_define_single_method(C_Socket, "for_fd", Fsock_for_fd, 1); + rb_define_single_method(C_Socket, "open", Ssock_open, 3); + rb_define_single_method(C_Socket, "new", Ssock_open, 3); + rb_define_single_method(C_Socket, "for_fd", Ssock_for_fd, 1); rb_define_method(C_Socket, "connect", Fsock_connect, 1); rb_define_method(C_Socket, "bind", Fsock_bind, 1); @@ -742,6 +742,6 @@ Init_Socket () rb_define_method(C_Socket, "recv", Fsock_recv, -2); rb_define_method(C_Socket, "recvfrom", Fsock_recv, -2); - rb_define_single_method(C_Socket, "socketpair", Fsock_socketpair, 3); + rb_define_single_method(C_Socket, "socketpair", Ssock_socketpair, 3); } #endif /* HAVE_SOCKET */ @@ -3,65 +3,64 @@ * �Ϥ����(�ʤ�Ruby��?) Ruby�ϡ�UNIX�Ǽ�ڤ˥��֥������Ȼظ��ץ�����ߥפ����Ȥ���˾�� -��¸����뤿������ޤ줿. ���Τ����ɬ�פ��Ȼפ�줿������: +��¸����뤿������ޤ줿�����Τ����ɬ�פ��Ȼפ�줿������: - * ʸˡ�䵡ǽ��ñ��Ǥ���. + * ʸˡ�䵡ǽ��ñ��Ǥ��롥 * ���֥������Ȼظ��ץ�����ߥݡ��Ȥ��뵡ǽ�� - ���ĸ���Ȥ����߷פ���Ƥ���. - * �����饦��ɥ����बû��(���ץ�Ǥ���). - * OS(UNIX)�ε�ǽ����ñ�����ѤǤ���. - * ������ץȸ���Ȥ��ƻȤ���. - * �����Ϥ�free�Ǥ���. - -�ʤɤǤ���. ���֥������Ȼظ�����Ȥ��ư���Ū�Ǥ���Smalltalk��C++�ʤɤ� -��ξ��ΰ������������ƤϤ��뤬, �ä˼�ڤʥץ�����ߥȤ������˷� -���Ƥ���, �ʾ�ξ������Ƥ���������ΤǤϤʤ��ä�. ����������ץȸ��� -�Ǥ���Perl�� Tcl�˥��֥������Ȼظ���ǽ���ɲä��������ƥ��¸�ߤ��뤬, -�����ϡּ�ڤ˥ץ�����ߥפȤ����������������ƤϤ��Ƥ�, �դ˥��� -�������Ȼظ���ǽ�����������������ä�. ��ä�, �����ξ������������� -�����߷פ���ɬ�פ�����ȹͤ���줿. ������Ƨ�ޤ����߷פ��줿Ruby -����ħ��: - - * ���ץ�Ǥ���. - * ñ����㳰�ξ��ʤ�ʸˡ. - * ��ʬ�ʥ��֥������Ȼظ���ǽ�����. - * �Ǥ�������䤹��(�黻�ҷ����ʤ�). - * �����١������쥯��������. - * �㳰������ǽ������. - * ��ʬ�˶��Ϥʥ��饹���Ȥ߹��ޤ�Ƥ���. - * OS���������뵡ǽ�������. - * ��ĥ���䤹��. - -�ʤɤ�����. Ruby��sh��Perl���ΤäƤ���ͤˤȤäƤξQ�ˤʤ뤿�����ä� -�Τ�, �����θ��줫��μ����ʰܹԤ���ǽ�Ǥ���Ȼפ���. �ץ�����ޤ� -Ruby�Υ��֥������Ȼظ���ǽ�ˤĤ��Ƴؤ٤�, ��궯�Ϥʤ��Ȥ�Ǥ���褦�� -�ʤ������. - -����C����ǥ��饹���åɤҤ�, �ɲä��뤳�Ȥ�Ruby�˶��Ϥˤ� -�뤳�Ȥ��Ǥ���. �����Υץ�åȥե�����Ǥ�Ruby��ưŪ�˥��֥������ȥե� -������Ǥ��뤷, �����Ǥʤ��Ƥ�Ruby��ƥ���ѥ��뤷���Ȥ߹��ߥ��� -�����ɲä���Τ��ưפǤ���(Perl�ʤɤ���Ϥ뤫���ưפǤ���). + ���ĸ���Ȥ����߷פ���Ƥ��롥 + * �����饦��ɥ����बû��(���ץ�Ǥ���)�� + * OS(UNIX)�ε�ǽ����ñ�����ѤǤ��롥 + * ������ץȸ���Ȥ��ƻȤ��롥 + * �����Ϥ�free�Ǥ��롥 + +�ʤɤǤ��롥���֥������Ȼظ�����Ȥ��ư���Ū�Ǥ���Smalltalk��C++�ʤɤ� +��ξ��ΰ������������ƤϤ��뤬���ä˼�ڤʥץ�����ߥȤ������˷� +���Ƥ��ꡤ�ʾ�ξ������Ƥ���������ΤǤϤʤ��ä�������������ץȸ��� +�Ǥ���Perl�� Tcl�˥��֥������Ȼظ���ǽ���ɲä��������ƥ��¸�ߤ��뤬�� +�����ϡּ�ڤ˥ץ�����ߥפȤ����������������ƤϤ��Ƥ⡤�դ˥��� +�������Ȼظ���ǽ�����������������ä�����äơ������ξ������������� +���߷פ��줿Ruby����ħ��: + + * ���ץ�Ǥ��롥 + * ñ����㳰�ξ��ʤ�ʸˡ�� + * ��ʬ�ʥ��֥������Ȼظ���ǽ����ġ� + * �Ǥ�������䤹��(�黻�ҷ����ʤ�)�� + * �����١������쥯�������롥 + * �㳰������ǽ�����롥 + * ��ʬ�˶��Ϥʥ��饹���Ȥ߹��ޤ�Ƥ��롥 + * OS���������뵡ǽ������롥 + * ��ĥ���䤹���� + +�ʤɤǤ��롥Ruby��sh��Perl���ΤäƤ���ͤˤȤäƤξQ�ˤʤ뤿�����ä� +�Τǡ������θ��줫��μ����ʰܹԤ���ǽ�Ǥ���Ȼפ��롥�ץ�����ޤ� +Ruby�Υ��֥������Ȼظ���ǽ�ˤĤ��Ƴؤ٤С���궯�Ϥʤ��Ȥ�Ǥ���褦�� +�ʤ�������� + +����C����ǥ��饹���åɤҤ����ɲä��뤳�Ȥ�Ruby�˶��Ϥˤ� +�뤳�Ȥ��Ǥ��롥�����Υץ�åȥե�����Ǥ�Ruby��ưŪ�˥��֥������ȥե� +������Ǥ��뤷�������Ǥʤ��Ƥ�Ruby��ƥ���ѥ��뤷���Ȥ߹��ߥ��� +�����ɲä���Τ��ưפǤ���(Perl�ʤɤ���Ϥ뤫���ưפǤ���)�� * Ruby��ʸˡ -�����Ǥ�Ruby�����ʸˡ����⤹��. Ruby�δ���Ū����ʬ�����˾�����, ʸ -ˡ���㳰�����ʤ��ΤǿȤˤĤ���ΤϤ��ۤ����ʤ�������. +�����Ǥ�Ruby�����ʸˡ����⤹�롥Ruby�δ���Ū����ʬ�Ͼ�������ʸˡ���� +�������ʤ��ΤǿȤˤĤ���ΤϤ��ۤ����ʤ��������� ** ������ -������ץȸ���ν����ˤʤ餤, ʸ������ʳ���'#'��������ޤǤϥ����� -�ȸ��ʤ�. +������ץȸ���ν����ˤʤ餤��ʸ������ʳ���'#'��������ޤǤϥ����� +�ȸ��ʤ��� ** ���ڤ국�� -����ʸ��(���֤ȥ��ڡ���)����Ӳ���(\n)�����ڤ국��Ȥʤ�. ���� +����ʸ��(���֤ȥ��ڡ���)����Ӳ���(\n)�����ڤ국��Ȥʤ롥���� ���Ԥ� a + b -�Τ褦�˹Ԥ���(ʸ)������ǽ���, ���ιԤ�³�����Ȥ�����ʾ��ʳ���ʸ�� -���ڤ�Ȥ��Ƥ�ǧ�������. +�Τ褦�˹Ԥ���(ʸ)������ǽ��ꡤ���ιԤ�³�����Ȥ�����ʾ��ʳ���ʸ�� +���ڤ�Ȥ��Ƥ�ǧ������롥 ** ͽ��� @@ -75,16 +74,16 @@ Ruby�Υ��֥������Ȼظ���ǽ�ˤĤ��Ƴؤ٤�, ��궯�Ϥʤ��Ȥ�Ǥ���褦�� else in retry until elsif include return when -ͽ���ϥ��饹̾, ��å�̾, �ѿ�̾�ʤɤ��Ѥ��뤳�ȤϤǤ��ʤ�. +ͽ���ϥ��饹̾����å�̾���ѿ�̾�ʤɤ��Ѥ��뤳�ȤϤǤ��ʤ��� ** �� -Ruby�ץ����������������Ǥϼ���ʸ�Ǥ���. �ޤ�, ��������⤹��. +Ruby�ץ����������������Ǥϼ���ʸ�Ǥ��롥�ޤ�����������⤹�롥 *** ��ƥ�� -�ץ���������ľ�ܵ��ҤǤ��륪�֥������Ȥ��ƥ��ȸƤ�. Ruby�Υ�ƥ� -��ˤ�ʸ����, ����ɽ��, ���ͤȤ�����ƥ�뤬����. +�ץ���������ľ�ܵ��ҤǤ��륪�֥������Ȥ��ƥ��ȸƤ֡�Ruby�Υ�ƥ� +��ˤ�ʸ��������ɽ�������ͤȤ�����ƥ�뤬���롥 **** ʸ�����ƥ�� @@ -100,19 +99,20 @@ Ruby�ץ����������������Ǥϼ���ʸ�Ǥ���. �ޤ�, ��������⤹��. \b �Хå����ڡ���(0x08) \a �٥�(0x07) \e ����������(0x1b) - \# ʸ��`#'���Τ�� + \# ʸ��`#'���Τ�� \nnn 8�ʿ�ɽ��(n��0-7) \xnn 16�ʿ�ɽ��(n��0-9,a-f) \^c ����ȥ�����ʸ��(c��ASCIIʸ��) \C-c ����ȥ�����ʸ��(Ʊ��) \M-c �ʸ��(c|0x80) + \����ʳ� ʸ�����Τ�� **** �ѿ�Ÿ�� ���֥륯������(`"')�ǰϤޤ줿ʸ���������ɽ������Ǥ� `#{�ѿ�̾}'�Ȥ� -���������ѿ������Ƥ�Ÿ�����뤳�Ȥ��Ǥ���. �ѿ����ѿ�����(`$',`@',`%') -����ľ��ˤ�`#�ѿ�̾'�Ȥ��������Ǥ�Ÿ���Ǥ���. ʸ��`#'��³��ʸ���� -`{',`$',`@',`%'�Ǥʤ����, ���Τޤ�`#'�Ȥ��Ʋ�ᤵ���. +���������ѿ������Ƥ�Ÿ�����뤳�Ȥ��Ǥ��롥�ѿ����ѿ�����(`$',`@',`%') + �ǻϤޤ���ˤ�`#�ѿ�̾'�Ȥ��������Ǥ�Ÿ���Ǥ��롥ʸ��`#'��³��ʸ�� +�� `{',`$',`@',`%'�Ǥʤ���С����Τޤ�`#'�Ȥ��Ʋ�ᤵ��롥 **** ����ɽ����ƥ�� @@ -121,11 +121,11 @@ Ruby�ץ����������������Ǥϼ���ʸ�Ǥ���. �ޤ�, ��������⤹��. ^ ��Ƭ $ ���� . Ǥ�դ�1ʸ�� - \w �ѿ���. [0-9A-Za-z_]��Ʊ�� + \w �ѿ�����[0-9A-Za-z_]��Ʊ�� \W ��ѿ��� - \s ����ʸ��. [ \t\n\r\f]��Ʊ�� + \s ����ʸ����[ \t\n\r\f]��Ʊ�� \S �����ʸ�� - \d ����. [0-9] ��Ʊ�� + \d ������[0-9] ��Ʊ�� \D ����� \b �춭��ʸ��(ʸ�����饹��) \B ��춭��ʸ�� @@ -138,7 +138,7 @@ Ruby�ץ����������������Ǥϼ���ʸ�Ǥ���. �ޤ�, ��������⤹��. | ���� ( ) ����ɽ����ޤȤ�� -����¾��ʸ�����Ʊ���Хå�����å��嵭ˡ��ͭ���Ǥ���. +����¾��ʸ�����Ʊ���Хå�����å��嵭ˡ��ͭ���Ǥ��롥 **** �磻��ɥ����ɥ�ƥ�� @@ -163,188 +163,188 @@ Ruby�ץ����������������Ǥϼ���ʸ�Ǥ���. �ޤ�, ��������⤹��. ?\M-a �a�Υ�����(225) ?\M-\C-a �-����ȥ�����a�Υ�����(129) - \����ܥ� ���̻�/�ѿ�̾�Ȱ��а��б���������. apply�ʤɤǥ�� - �ɤ���ꤹ��Τ˻Ȥ�. + \����ܥ� ���̻�/�ѿ�̾�Ȱ��а��б�����������apply�ʤɤǥ�� + �ɤ���ꤹ��Τ˻Ȥ��� -?ɽ���Ǥ����ƤΥХå�����å��嵭ˡ��ͭ���Ǥ���. +?ɽ���Ǥ����ƤΥХå�����å��嵭ˡ��ͭ���Ǥ��롥 *** ���ޥ�ɤν��� Ruby�Ǥ�sh�Τ褦�˥��ޥ�ɤμ¹Է�̤�ʸ�����ƥ��Τ褦�˻Ȥ����Ȥ� -�Ǥ���. ``�ǰϤޤ줿ʸ�����, ���֥륯�����Ȥ�Ʊ�ͤ˥Хå�����å��嵭 -ˡ�β����ѿ�Ÿ�����Ԥʤ�줿��, ���ޥ�ɤȤ��Ƽ¹Ԥ���, ���μ¹Է�� -��ʸ����Ȥ���Ϳ������. ���ޥ�ɤ�ɾ������뤿�Ӥ˼¹Ԥ����. +�Ǥ��롥``�ǰϤޤ줿ʸ����ϡ����֥륯�����Ȥ�Ʊ�ͤ˥Хå�����å��嵭 +ˡ�β����ѿ�Ÿ�����Ԥʤ�줿�塤���ޥ�ɤȤ��Ƽ¹Ԥ��졤���μ¹Է�� +��ʸ����Ȥ���Ϳ�����롥���ޥ�ɤ�ɾ������뤿�Ӥ˼¹Ԥ���롥 *** �ѿ����� -Ruby���ѿ��ϥ�������(ͭ���ϰ�)�ȼ�̿(ͭ������)�ˤ�ä�4�����ʬ�व��, -���μ�����ѿ�̾�κǽ�ΰ�ʸ���Ƿ��ꤵ���. �̾���ѿ���2ʸ���ܰʹߤ� -�ѿ����ޤ���`_'�Ǥ��뤬, �����ƥ��ѿ��ΰ����ϡ�`$'+1ʸ���ε���פȤ��� -�ѿ�������. �ѿ�̾��Ĺ���˴ؤ������̤����¤Ϥʤ�. +Ruby���ѿ��ϥ�������(ͭ���ϰ�)�ȼ�̿(ͭ������)�ˤ�ä�4�����ʬ�व�졤 +���μ�����ѿ�̾�κǽ�ΰ�ʸ���Ƿ��ꤵ��롥�̾���ѿ���2ʸ���ܰʹߤ� +�ѿ����ޤ���`_'�Ǥ��뤬�������ƥ��ѿ��ΰ����ϡ�`$'+1ʸ���ε���פȤ��� +�ѿ������롥�ѿ�̾��Ĺ���˴ؤ������̤����¤Ϥʤ��� -�ѿ��Υ������פ˴ؤ�餺, ���������Ƥ��ʤ��ѿ��Ȥ��������ͤ�nil -�Ǥ���. +�ѿ��Υ������פ˴ؤ�餺�����������Ƥ��ʤ��ѿ��Ȥ��������ͤ�nil +�Ǥ��롥 **** �������Х��ѿ� -`$'�ǻϤޤ��ѿ��Υ������פϥ������Х�Ǥ���, �ץ������Τɤ�����Ǥ� -���ȤǤ���. ���μ�̿�ϥץ������μ�̿��������. +`$'�ǻϤޤ��ѿ��Υ������פϥ������Х�Ǥ��ꡤ�ץ������Τɤ�����Ǥ� +���ȤǤ��롥���μ�̿�ϥץ������μ�̿���������� **** �������ѿ� -`@'�ǻϤޤ��ѿ��ϥ������ѿ��Ǥ���, ���Υ��饹�ޤ��ϥ��֥��饹�� -��åɤ��黲�ȤǤ���. �������פϥ�å���Ǥ���, ���μ�̿�ϥ��֥��� -���Ȥμ�̿��������. +`@'�ǻϤޤ��ѿ��ϥ������ѿ��Ǥ��ꡤ���Υ��饹�ޤ��ϥ��֥��饹�� +��åɤ��黲�ȤǤ��롥�������פϥ�å���Ǥ��ꡤ���μ�̿�ϥ��֥��� +���Ȥμ�̿���������� **** ���饹̾/�⥸�塼��̾/���������ѿ� -����ե��٥åȤޤ���`_'�ǻϤޤ��ѿ��ϼ��̻ҤȤ�ƤФ�, ���������ѿ�, -���饹̾�ޤ��ϥ⥸�塼��̾�Ǥ���. +����ե��٥åȤޤ���`_'�ǻϤޤ��ѿ��ϼ��̻ҤȤ�ƤФ졤���������ѿ��� +���饹̾�ޤ��ϥ⥸�塼��̾�Ǥ��롥 ������֤Ǥϼ��̻Ҥϥ��饹/�⥸�塼��̾�Ȥߤʤ���뤬(�������륯�饹�� -¸�ߤ��ʤ������ͤ�nil), �������κ��դ˸��줿���̻Ҥ�,���Υ��������� -�Ǥϥ��������ѿ��Ȥ��Ƹ��ʤ���, Ʊ̾�Υ��饹��⥸�塼��ϱ������. �� -�ΰ�̣�Ǽ��̻Ҥؤ�����������Ȥ��Ƥ�Ư�������. +¸�ߤ��ʤ������ͤ�nil)���������κ��դ˸��줿���̻Ҥϡ����Υ��������� +�Ǥϥ��������ѿ��Ȥ��Ƹ��ʤ��졤Ʊ̾�Υ��饹��⥸�塼��ϱ�����롥�� +�ΰ�̣�Ǽ��̻Ҥؤ�����������Ȥ��Ƥ�Ư������ġ� Array # ���饹 Array - Array = 15 # ����. �ʸ�Array�ϥ��������ѿ� + Array = 15 # �������ʸ�Array�ϥ��������ѿ� print Array, "\n" # `15'�����Ϥ���� -��������Ȥ��Ƥ������β��ϥ���ѥ�����˹Ԥʤ��뤿��, ���̻Ҥؤ��� -�������ºݤ˼¹Ԥ���Ƥ⤵��ʤ��Ƥ�, �ʹߤΥ���������ǤϤ��μ��̻Ҥ� -���������ѿ��Ȥߤʤ����. +��������Ȥ��Ƥ������β��ϥ���ѥ�����˹Ԥʤ��뤿�ᡤ���̻Ҥؤ��� +�������ºݤ˼¹Ԥ���Ƥ⤵��ʤ��Ƥ⡤�ʹߤΥ���������ǤϤ��μ��̻Ҥ� +���������ѿ��Ȥߤʤ���롥 Array # ���饹 Array if %FALSE - Array = 15 # ���Υ����ɤϼ¹Ԥ���ʤ���, - # �ʹ�Array�ϥ��������ѿ��Ȥߤʤ����. + Array = 15 # ���Υ����ɤϼ¹Ԥ���ʤ����� + # �ʹ�Array�ϥ��������ѿ��Ȥߤʤ���롥 end print Array, "\n" # `nil'�����Ϥ���� -���Υ롼��ϰ츫ʣ������, ���饹/�⥸�塼��̾�ȥ��������ѿ�̾����ʣ�� -�ʤ��¤�, ̤������Υ��������ѿ����ͤ�nil�Ǥ���ȹͤ��Ƥ⺹���٤��Ϥ� -��. Ruby���Ȥ߹��ߥ��饹����ʸ���Υ���ե��٥åȤǻϤޤ�̾�����Ĥ��� -����, �桼���⥯�饹/�⥸�塼��̾�ˤ���ʸ���ǻϤޤ뼱�̻Ҥ�, �������� -�ѿ�̾�ˤϾ�ʸ���ޤ���`_'�ǻϤޤ뼱�̻Ҥ�Ȥ����Ȥ��侩����. +���Υ롼��ϰ츫ʣ�����������饹/�⥸�塼��̾�ȥ��������ѿ�̾����ʣ�� +�ʤ��¤ꡤ̤������Υ��������ѿ����ͤ�nil�Ǥ���ȹͤ��Ƥ⺹���٤��Ϥ� +����Ruby���Ȥ߹��ߥ��饹����ʸ���Υ���ե��٥åȤǻϤޤ�̾�����Ĥ��� +���ꡤ�桼���⥯�饹/�⥸�塼��̾�ˤ���ʸ���ǻϤޤ뼱�̻Ҥ������� +�ѿ�̾�ˤϾ�ʸ���ޤ���`_'�ǻϤޤ뼱�̻Ҥ�Ȥ����Ȥ��侩���롥 ���������ѿ��Υ������פ��̿�⤽�Υ֥��å��ν���ޤ�(�ȥåץ�٥�Υ��� -�����ѿ��ϥץ������ν�λ�ޤ�)�Ǥ���. +�����ѿ��ϥץ������ν�λ�ޤ�)�Ǥ��롥 **** ���饹�ѿ�(���) -`%'�ǻϤޤ��ѿ��ϥ��饹�ѿ��Ǥ���, ���Υ��饹�����ƤΥ��֥��饹�Υ��� -�������黲�ȤǤ���. �����ѿ��ؤ������ϥȥåץ�٥�, ���ʤ����� -�ɤ�����Ǥ����٥�ǤΤ߲�ǽ�Ǥ���. �����ѿ��ϥ��饹�֤��ͤ���ͭ����, -������������ȥ�åɤ�����ͤ��ѹ����뤳�Ȥ��Ǥ��ʤ��Τ�,����Ȥ��� -�Ѥ�����. +`%'�ǻϤޤ��ѿ��ϥ��饹�ѿ��Ǥ��ꡤ���Υ��饹�����ƤΥ��֥��饹�Υ��� +�������黲�ȤǤ��롥�����ѿ��ؤ������ϥȥåץ�٥롤���ʤ����� +�ɤ�����Ǥ����٥�ǤΤ߲�ǽ�Ǥ��롥�����ѿ��ϥ��饹�֤��ͤ���ͭ���졤 +������������ȥ�åɤ�����ͤ��ѹ����뤳�Ȥ��Ǥ��ʤ��Τǡ�����Ȥ��� +�Ѥ����롥 **** �����ѿ� -�̾���ѿ��ʳ��˵����ѿ��ȸƤФ���ü���ѿ���4�Ĥ���. +�̾���ѿ��ʳ��˵����ѿ��ȸƤФ���ü���ѿ���4�Ĥ��롥 self | ���ߤΥ�åɤμ¹Լ��� nil | Nil���饹��ͣ��Υ�����(����ɽ��) __FILE__ | ������ץȤΥե�����̾(ʸ����) - __LINE__ | ���ߤι��ֹ� + __LINE__ | ���ߤι��ֹ�(����) -�����ε����ѿ��������ˤ�äƤ����ͤ��ѹ����뤳�ȤϤǤ��ʤ�. ������ -�ѿ��ؤ��������㳰��ȯ��������. +�����ε����ѿ��������ˤ�äƤ����ͤ��ѹ����뤳�ȤϤǤ��ʤ��������� +�ѿ��ؤ��������㳰��ȯ�������롥 *** ��å������� -���֥������Ȥ˥�å��������������Ū�ʹ�ʸ����å��������Ǥ���, ���δ� -�ܷ����ϰʲ����̤�Ǥ���. +���֥������Ȥ˥�å��������������Ū�ʹ�ʸ����å��������Ǥ��ꡤ���δ� +�ܷ����ϰʲ����̤�Ǥ��롥 ��1 '.' ��å�̾ '(' ����1... [',' '*' ����n ]')' -��1��ɾ�����������륪�֥������Ȥ�, ���̻Ҥǻ��ꤵ����åɤ�Ƥ� -�Ф�. ���ֺǸ�ΰ�����'*'��³��(ñ���)���Ǥ�����, ���μ���ɾ������ -���(����Ǥ���ɬ�פ�����)��Ÿ������, �����Ȥ����ɲä���. +��1��ɾ�����������륪�֥������ȤΡ����̻Ҥǻ��ꤵ����åɤ�Ƥ� +�Ф������ֺǸ�ΰ�����'*'��³��(ñ���)���Ǥ����硤���μ���ɾ������ +���(����Ǥ���ɬ�פ�����)��Ÿ�����ơ������Ȥ����ɲä��롥 -��������Ĥ�ʤ����ˤϳ�̤��ά�Ǥ���. +��������Ĥ�ʤ����ˤϳ�̤��ά�Ǥ��롥 -��å�̾�Ȥ��Ƥ�Ǥ�դμ��̻Ҥ��Ѥ��뤳�Ȥ��Ǥ���. �ѿ�̾�Ȥϼ��̻Ҥ� -̾�����֤��㤦�Τǽ�ʣ���Ƥ��ʤ�. +��å�̾�Ȥ��Ƥ�Ǥ�դμ��̻Ҥ��Ѥ��뤳�Ȥ��Ǥ��롥�ѿ�̾�Ȥϼ��̻Ҥ� +̾�����֤��㤦�Τǽ�ʣ���Ƥ��ʤ��� -��å���������, �쥷���Ф�self�ξ��, �쥷���Ф��ά�����̾�Υץ����� -�ߥ���ˤ�����ؿ��Τ褦�ʷ����ǥ�åɤ�ƤӽФ����Ȥ��Ǥ���. �� -�ξ�������1�Ĥ�ʤ����Ǥ��̤ξ�ά�ϤǤ��ʤ�. +��å��������ǡ��쥷���Ф�self�ξ�硤�쥷���Ф��ά�����̾�Υץ����� +�ߥ���ˤ�����ؿ��Τ褦�ʷ����ǥ�åɤ�ƤӽФ����Ȥ��Ǥ��롥�� +�ξ�������1�Ĥ�ʤ����Ǥ��̤ξ�ά�ϤǤ��ʤ��� ���饹���ʸ�γ��ǻ��ꤵ�줿��åɤȥ��饹Module��noexport��åɤ� -���ꤵ�줿��åɤϴؿ�Ū��åɤȸƤФ�, �ؿ������Ǥ����ƤӽФ����� -���Ǥ��ʤ�. +���ꤵ�줿��åɤϴؿ�Ū��åɤȸƤФ졤�ؿ������Ǥ����ƤӽФ����� +���Ǥ��ʤ��� *** �����ѡ����饹�Υ�åɸƤӽФ� ��å����������ü�ʥ������Ȥ��ƥ����ѡ����饹�Υ�åɤθƤӽФ����� -��. ���η����ϥ�åɤ������������˥����ѡ����饹����������Ѥ��뤿 -��˻Ȥ�. +�롥���η����ϥ�åɤ������������˥����ѡ����饹����������Ѥ��뤿 +��˻Ȥ��� super ���ߤΥ�åɤ�Ϳ����줿�����Τޤޥ����ѥ��饹��Ʊ̾�Υ�åɤ�Ƥ� -�Ф�. +�Ф��� super'(' ����... ')' -�����ȤȤ�˥����ѡ����饹��Ʊ̾�Υ�åɤ�ƤӽФ�. ���ֺǸ�ΰ����� -`*'��³�������̾�Υ�åɸƤӽФ���Ʊ�ͤ��Ϥ����. +�����ȤȤ�˥����ѡ����饹��Ʊ̾�Υ�åɤ�ƤӽФ������ֺǸ�ΰ����� +`*'��³�������̾�Υ�åɸƤӽФ���Ʊ�ͤ��Ϥ���롥 *** ����/Ϣ������ -����Υ��֥������Ȥ��������뼰�η����ϰʲ��η����Ǥ���. +����Υ��֥������Ȥ��������뼰�η����ϰʲ��η����Ǥ��롥 '[' ��, ... ']' -���줾��μ���ɾ��������̤�ޤ�������֤�. ���ǿ���0�ζ������������ +���줾��μ���ɾ��������̤�ޤ�������֤������ǿ���0�ζ������������ �뤿��ˤ϶������� '[' ']' -���Ѥ���. +���Ѥ��롥 ** Ϣ������ -Ϣ������Ȥ�Ǥ�դΥ��֥������Ȥ�(ź��)�Ȥ��ƻ��Ƥ�����Ǥ���. Ruby -�Ǥ�Ϣ�������Smalltalk���Ѹ��ڤ��Dict(����)�Ȥ�ƤФ��. �ܺ٤ϥ� -�饹Dict�ι�Ȥ��줿��. Ϣ���������������Ϣ�����ϰʲ��η����� -����. +Ϣ������Ȥ�Ǥ�դΥ��֥������Ȥ�(ź��)�Ȥ��ƻ��Ƥ�����Ǥ��롥Ruby +�Ǥ�Ϣ�������Smalltalk���Ѹ��ڤ��Dict(����)�Ȥ�ƤФ�롥�ܺ٤ϥ� +�饹Dict�ι�Ȥ��줿����Ϣ���������������Ϣ�����ϰʲ��η����� +���롥 '{' �� '=>' ��... '}' -���줾��μ���ɾ��������̤����ͤȤ���Ϣ�����֥������Ȥ��֤�. +���줾��μ���ɾ��������̤����ͤȤ���Ϣ�����֥������Ȥ��֤��� ���ǿ���0��Ϣ��������������뤿��ˤ϶���Ϣ������ '{' '}' -���Ѥ���. +���Ѥ��롥 -*** ����, �������� +*** ���ȡ��������� -����(Ϣ�������ޤ�)�����Ǥλ��Ȥϰʲ��η����ǹԤʤ�. +����(Ϣ�������ޤ�)�����Ǥλ��Ȥϰʲ��η����ǹԤʤ��� ��1 '[' ��2... ']' -���η���������Ū��, ��1��"[]"�Ȥ�����å�����������Ȳ�ᤵ���. ���� -ư���Ū�ʥ����ɤǵ��Ҥ���аʲ��Τ褦�ˤʤ�. +���η���������Ū�ˡ���1��"[]"�Ȥ�����å�����������Ȳ�ᤵ��롥���� +ư���Ū�ʥ����ɤǵ��Ҥ���аʲ��Τ褦�ˤʤ롥 - ��1"[]="(��2) + ��1"[]"(��2...) -����, �������Ǥ������� +�������������Ǥ������� ��1 '[' ��2... ']' '=' ��n -�Ȥ��������ǹԤʤ��, +�Ȥ��������ǹԤʤ�졤 - ��1."[]="(��2..) + ��1."[]="(��2...) -�Ȥ��������Ȥ��Ʋ�ᤵ���. +�Ȥ��������Ȥ��Ʋ�ᤵ��롥 *** �黻�ҷ��� �ץ�����ߥ����ؤΤ���˰����Υ�åɸƤӽФ������湽¤�ϱ黻�ҷ� -����Ȥ�. Ruby�ˤϰʲ��ˤ�����黻�Ҥ�����. ��Τ�Τۤɷ���̤�����, -Ʊ����α黻�Ҥη���̤�Ʊ���Ǥ���. +����Ȥ롥Ruby�ˤϰʲ��ˤ�����黻�Ҥ����롥��Τ�Τۤɷ���̤������� +Ʊ����α黻�Ҥη���̤�Ʊ���Ǥ��롥 �� -(unary) +(unary) ! ~ ** @@ -357,76 +357,76 @@ Ruby���ѿ��ϥ�������(ͭ���ϰ�)�ȼ�̿(ͭ������)�ˤ�ä�4�����ʬ�व��, <=> == != =~ !~ && || - .. ... + .. ..�� :: �� =(����) ��������(+=, -=, ..) �ۤȤ�ɤα黻���ˤϥ�åɸƤӽФ��Ȥ��Ʋ�ᤵ���(���饹��˺���� -�Ǥ���)��, ����������Ǥ��ʤ��ü�ʤ�Τ�����. ������Ǥ��ʤ��ü�黻 +�Ǥ���)��������������Ǥ��ʤ��ü�ʤ�Τ����롥������Ǥ��ʤ��ü�黻 �Ҥ� - &&(������), ||(������), =(����), ...(�ϰϻ���), + &&(������), ||(������), =(����), ...(�ϰϻ���) -��4�ĤǤ���. +��4�ĤǤ��롥 -��Ǥ������ü�黻�Ұʳ��α黻�ҷ����ϥ�åɸƤӽФ��ȸ��ʤ����. +��Ǥ������ü�黻�Ұʳ��α黻�ҷ����ϥ�åɸƤӽФ��ȸ��ʤ���롥 ñ��黻��(+, -, !, ~)�� ��1."�黻��"() -�Ȥ���������, ����ʳ���2��黻�Ҥ� +�Ȥ��������ˡ�����ʳ���2��黻�Ҥ� ��1."�黻��"(��2) -�˲�ᤵ���. +�˲�ᤵ��롥 ** ���� -�����ˤ��ѿ����Ф�������(��������)��, �ץ��������ñ�ˤ��뤿��Υ��� -���å������奬���Ȥ��Ƥ�����������. ���������ϰʲ��η����Ǥ���. +�����ˤ��ѿ����Ф�������(��������)�ȡ��ץ��������ñ�ˤ��뤿��Υ��� +���å������奬���Ȥ��Ƥ����������롥���������ϰʲ��η����Ǥ��롥 �ѿ� '=' �� -����ϼ���ɾ����, �ѿ����ͤȤ�����������. ���饹��⥸�塼��䵿���ѿ� -�ˤ������Ǥ��ʤ�. ���饹��⥸�塼���������ѹ����뤿��ˤ�classʸ, -moduleʸ���Ѥ���. �������ϱ黻�ҷ�����ȤäƤ��뤬, ��åɤǤϤʤ��� -�Ǻ�������뤳�ȤϤǤ��ʤ�. +����ϼ���ɾ�������ѿ����ͤȤ����������롥���饹��⥸�塼��䵿���ѿ� +�ˤ������Ǥ��ʤ������饹��⥸�塼���������ѹ����뤿��ˤ�classʸ�� +moduleʸ���Ѥ��롥�������ϱ黻�ҷ�����ȤäƤ��뤬����åɤǤϤʤ��� +�Ǻ�������뤳�ȤϤǤ��ʤ��� -���å������奬���Ȥ��Ƥ��������ϰʲ��Τ�Τ�����. +���å������奬���Ȥ��Ƥ��������ϰʲ��Τ�Τ����롥 �������Ǥؤ����� ��1'[' ��2... ' ]' '=' ��n -��1��ɾ�����������륪�֥������Ȥ�, ��2���鼰n�ޤǤ�����Ȥ���, "[]=" -�Ȥ�����åɤ�ƤӽФ�. +��1��ɾ�����������륪�֥������Ȥˡ���2���鼰n�ޤǤ�����Ȥ��ơ�"[]=" +�Ȥ�����åɤ�ƤӽФ��� °������ ��1 '.' ���̻� '=' ��2 -��1��ɾ�����������륪�֥������Ȥ��Ф���"���̻�="�Ȥ�����åɤ�, �� -2������Ȥ��ƸƤӽФ�. +��1��ɾ�����������륪�֥������Ȥ��Ф���"���̻�="�Ȥ�����åɤ� +2������Ȥ��ƸƤӽФ��� �������� - ��1 op= ��2 # ��1��������ǽ�Ǥʤ���Фʤ�ʤ�. + ��1 op= ��2 # ��1��������ǽ�Ǥʤ���Фʤ�ʤ��� -���η���������Ū�ˡּ�1 = ��1 op ��2�פ�Ÿ������, �¹Ԥ����. ���Τ��� -��1��2��ɾ�������Τ�, �����Ѥ��������ͽ�ۤ��ʤ���̤�Ƥֲ�ǽ���� -����. �������������ϥץ�����ޤΥ������餹��Ū�Τ����¸�ߤ���� -���Ǥ���. op�Ȥ��ƻȤ���黻�Ҥ� +���η���������Ū�ˡּ�1 = ��1 op ��2�פ�Ÿ�����졤�¹Ԥ���롥���Τ��� +��1��2��ɾ�������Τǡ������Ѥ��������ͽ�ۤ��ʤ���̤�Ƥֲ�ǽ���� +���롥�������������ϥץ�����ޤΥ������餹��Ū�Τ��������¸�ߤ� +������Ǥ��롥op�Ȥ��ƻȤ���黻�Ҥ� +, -, *, /, %, **, &, |, ^, <<, >> -��11����Ǥ���. �黻�Ҥ�`='�δ֤˥��ڡ���������ƤϤ����ʤ�. +��11����Ǥ��롥�黻�Ҥ�`='�δ֤˥��ڡ���������ƤϤ����ʤ��� *** ���ʬ���� -�����ͤˤ�ä�ʬ�����뼰�ϰʲ��˼���if��, unless��, case����ʣ��ʸ���� -3����ȱ黻�ҷ���3���ढ��. Ruby�Ǥ�nil����, ����ʳ�������ɾ�������. -C��Perl�ʤɤȤϰۤʤ�, 0�� ""(��ʸ����)�ϵ��Ȥ�ɾ������ʤ��Τǵ���� -���뤳��. +�����ͤˤ�ä�ʬ�����뼰�ϰʲ��˼���if����unless����case����ʣ��ʸ���� +3����ȱ黻�ҷ���3���ढ�롥Ruby�Ǥ�nil����������ʳ�������ɾ������롥 +C��Perl�ʤɤȤϰۤʤꡤ0�� ""(��ʸ����)�ϵ��Ȥ�ɾ������ʤ��Τǵ���� +���뤳�ȡ� if�� @@ -438,9 +438,9 @@ if�� ʸn ] end -���Ƚ�Ǽ�. ��1�����ξ���ʸ1��ɾ������. ����ʳ��ξ���ʸ2��ɾ���� -��. Ruby��if����else if�Ǥ�elif�Ǥ�ʤ�elsif��if��Ϣ³��Ԥʤ����Ȥ��� -�դ��뤳��. +���Ƚ�Ǽ�����1�����ξ���ʸ1��ɾ�����롥����ʳ��ξ���ʸ2��ɾ���� +�롥Ruby��if����else if�Ǥ�elif�Ǥ�ʤ�elsif��if��Ϣ³��Ԥʤ����Ȥ��� +�դ��뤳�ȡ� unless�� @@ -450,22 +450,22 @@ unless�� ʸ2 ] end -��1����(nil)���֤���, ��2��ɾ������㳰��ȯ����������ʸ1��ɾ������. -����ʳ��ξ���ʸ2��ɾ������. +��1����(nil)���֤�������2��ɾ������㳰��ȯ����������ʸ1��ɾ�����롥 +����ʳ��ξ���ʸ2��ɾ�����롥 case�� case ��0 [when ��1 [, ��2]... [then] - ʸ1 ]... + ʸ1 ]..�� [else ʸn ] end -���ʬ��, C��switch����Pascal��case�˻��Ƥ���. break��æ�Ф��뤳�Ȥ� -�����ʸ�˷�³���뤳�Ȥ�ʤ��Τ�����. +���ʬ����C��switch����Pascal��case�˻��Ƥ��롥break��æ�Ф��뤳�Ȥ� +�����ʸ�˷�³���뤳�Ȥ�ʤ��Τ����ա� -���ΰ��פϡּ�n =~ ��0]�ǹԤʤ���. �Ĥޤ�, +���ΰ��פϡּ�n =~ ��0]�ǹԤʤ��롥�Ĥޤꡤ case expr0 when expr1, expr2 @@ -476,7 +476,7 @@ case�� stmt3 end -�ϰʲ���ifʸ�������Ǥ���. +�ϰʲ���ifʸ�Ȥۤ������Ǥ��롥 _tmp = expr0 if expr1 =~ _tmp || expr2 =~ _tmp @@ -491,21 +491,21 @@ case�� ��1 '&&' ��2 -��1��ɾ����, �����ͤ���(nil�ʳ�)�Ǥ����, ��2��ɾ������. +��1��ɾ�����������ͤ���(nil�ʳ�)�Ǥ���С���2��ɾ�����롥 ��1 '||' ��2 -��1��ɾ����, �����ͤ����Ǥ����, ��2��ɾ������. +��1��ɾ�����������ͤ����Ǥ���С���2��ɾ�����롥 ��1 '...' ��2 -��1�����ˤʤ�ޤǤϵ����֤�, ���θ�ϼ�2�������֤��ޤǤϿ����֤�. ��2 +��1�����ˤʤ�ޤǤϵ����֤������θ�ϼ�2�������֤��ޤǤϿ����֤�����2 �����ˤʤ�о��֤ϵ������ *** �����֤���(ñ�㷿) -�롼�פ������뼰. �����μ����ͤϾ��nil�Ǥ���. ���֥������Ȥ˹�� -�����롼�פ�Ԥʤ�����ˤϼ��˽Ҥ٤륤�ƥ졼�����Ѥ���. +�롼�פ������뼰�������μ����ͤϾ��nil�Ǥ��롥���֥������Ȥ˹�� +�����롼�פ�Ԥʤ�����ˤϼ��˽Ҥ٤륤�ƥ졼�����Ѥ��롥 while�� @@ -513,7 +513,7 @@ while�� ʸ end -��郎���δ�, ʸ���֤��¹Ԥ���. +��郎���δ֡�ʸ���֤��¹Ԥ��롥 until�� @@ -522,82 +522,80 @@ until�� end ��1 until ��2 -������(nil)���֤���, ����ɾ������㳰��ȯ�������, ʸ���֤��¹Ԥ� -��. +������(nil)���֤���������ɾ������㳰��ȯ������֡�ʸ���֤��¹Ԥ� +�롥 *** ��P�ˤĤ��� -if, unless, while, until�ξ��Ƚ�����μ�, ������ü�黻��`...'��ξ�� -�μ��Ͼ�P�ȸƤФ��. ��P�Ǥ�ʸ���������ɽ����ƥ��ϼ���$_=~�� -�ƥ��פξ�ά�Ǥ���Ȥߤʤ����. ���˱黻��`...'��ξ�դǤ���������� -��$.==����פξ�ά�Ȳ�ᤵ���. ��P�˸����黻�� `&&', `||', `!'�� -���դμ����P�Ȥߤʤ����. +if��unless��while��until�ξ��Ƚ�����μ���������ü�黻��`...'��ξ�� +�μ��Ͼ�P�ȸƤФ�롥��P�Ǥ�ʸ���������ɽ����ƥ��ϼ���$_=~�� +�ƥ��פξ�ά�Ǥ���Ȥߤʤ���롥���˱黻��`...'��ξ�դǤ���������� +��$.==����פξ�ά�Ȳ�ᤵ��롥��P�˸����黻�� `&&', `||', `!'�� +���դμ����P�Ȥߤʤ���롥 -����: �黻��`!'���ü�黻�ҤǤϤʤ��Τ�, �������Ԥʤ����˵���Ĥ� -�뤳��. ��P����� +����: �黻��`!'���ü�黻�ҤǤϤʤ��Τǡ��������Ԥʤ����˵���Ĥ� +�뤳�ȡ���P����� ! ʸ�����ƥ�� ! ����ɽ����ƥ�� -�η��ǸƤӽФ�����åɤΰ�����, ��ƥ���ɽ�����֥������ȤǤϤʤ�, -�嵭����Ӥη�̤�Ϳ������. ���Τ���, ��§Ū��`!'��åɤϺ������ -�ʤ������ɤ�. +�η��ǸƤӽФ�����åɤΰ����ϡ���ƥ���ɽ�����֥������ȤǤϤʤ��� +�嵭����Ӥη�̤�Ϳ�����롥���Τ��ᡤ��§Ū��`!'��åɤϺ������ +�ʤ������ɤ��� *** ���ƥ졼��(�����֤���) -** ���ƥ졼�� - ���ƥ졼���Ȥ����湽¤(�ä˥롼��)����ݲ��Τ�����Ѥ������åɤ� -���Ǥ���. �����ɤ�����(�֥��å��ȸƤФ��)����ꤷ�ƥ��ƥ졼����Ƥ� -�Ф���, ���ƥ졼����Ŭ�����ͤåȤ��ƥ֥��å���ɾ������(�����餯�� -ʣ����). ���ƥ졼������Υ֥��å��θƤӽФ���yield�����Ѥ���(���). +���Ǥ��롥�����ɤ�����(�֥��å��ȸƤФ��)����ꤷ�ƥ��ƥ졼����Ƥ� +�Ф��ȡ����ƥ졼����Ŭ�����ͤåȤ��ƥ֥��å���ɾ������(�����餯�� +ʣ����)�����ƥ졼������Υ֥��å��θƤӽФ���yield�����Ѥ���(���)�� -���ƥ졼���θƤӽФ��ϰʲ��ι�ʸ�ǹԤʤ���. +���ƥ졼���θƤӽФ��ϰʲ��ι�ʸ�ǹԤʤ��롥 ���ƥ졼���Ȥ����湽¤(�ä˥롼��)����ݲ��Τ�����Ѥ������åɤ� -���Ǥ���. ���ƥ졼���θƤӽФ��ϰʲ��ι�ʸ�ǹԤʤ���. +���Ǥ��롥���ƥ졼���θƤӽФ��ϰʲ��ι�ʸ�ǹԤʤ��롥 �� '{' �ѿ�... '|' ʸ '}' -��ʸ�פ�֥��å��Ȥ������ꤷ, �ּ��פΥ�åɤƥ졼���Ȥ���ɾ���� -��. �ּ��פΥȥåץ�٥�Υ�åɤ��������ƥ졼���Ȥ��ƸƤӽФ���, -�쥷���Ф�ɽ������, �����μ��ϥ��ƥ졼���Ȥ��ƤϸƤӽФ���ʤ�. �ּ��� -��ʣ���μ���ޤ��, �ơ������ƥ졼���Ȥ��ƽ�˸ƤФ��. +��ʸ�פ�֥��å��Ȥ������ꤷ���ּ��פΥ�åɤƥ졼���Ȥ���ɾ���� +�롥�ּ��פΥȥåץ�٥�Υ�åɤ��������ƥ졼���Ȥ��ƸƤӽФ��졤 +�쥷���Ф�ɽ�����䡤�����μ��ϥ��ƥ졼���Ȥ��ƤϸƤӽФ���ʤ����ּ��� +��ʣ���μ���ޤ�����ơ������ƥ졼���Ȥ��ƽ�˸ƤФ�롥 -���ƥ졼�����yieldʸ���¹Ԥ�����, �����ǻ��ꤵ�줿�ͤ�doʸ�ǻ��ꤵ -�줿�ѿ�����������, �֥��å����¹Ԥ����. �֥��å��μ¹Ԥ���λ����Ȥ� -���ͤ� yieldʸ���ͤȤ����֤����. �����åɤ����ƥ졼���Ȥ��ƸƤӽ� -���줿���ɤ����ϥ�å�iterator_p()������ͤ��Τ뤳�Ȥ��Ǥ���. ��ˤ� +���ƥ졼�����yieldʸ���¹Ԥ����ȡ������ǻ��ꤵ�줿�ͤ�doʸ�ǻ��ꤵ +�줿�ѿ����������졤�֥��å����¹Ԥ���롥�֥��å��μ¹Ԥ���λ����Ȥ� +���ͤ� yieldʸ���ͤȤ����֤���롥�����åɤ����ƥ졼���Ȥ��ƸƤӽ� +���줿���ɤ����ϥ�å�iterator_p()������ͤ��Τ뤳�Ȥ��Ǥ��롥��ˤ� Enumerable�⥸�塼���grep��åɤΤ褦�˥��ƥ졼���Ȥ��ƸƤФ줿���� -���̤Υ�åɤȤ��ƸƤФ줿���Ȥ�ư��ۤʤ��åɤ⤢��. +���̤Υ�åɤȤ��ƸƤФ줿���Ȥ�ư��ۤʤ��åɤ⤢�롥 -���֥������Ȥγ����Ǥ��Ф�������Ԥʤ�����η���������Ƥ���. �� -���ϰʲ����̤�. +���֥������Ȥγ����Ǥ��Ф�������Ԥʤ�����η���������Ƥ��롥�� +���ϰʲ����̤ꡥ for �ѿ�.. in �� ʸ end -���γ����Ǥ��Ф�ʸ��¹Ԥ���. ����ϰʲ��μ��������Ǥ���. +���γ����Ǥ��Ф�ʸ��¹Ԥ��롥����ϰʲ��μ��������Ǥ��롥 �� '{' �ѿ� '|' ʸ '}' -��äƼ����ͤΥ��֥������Ȥ���å�each������ʤ����, for��¹Ԥ��� -���㳰��ȯ������. +��äƼ����ͤΥ��֥������Ȥ���å�each������ʤ���硤for��¹Ԥ��� +���㳰��ȯ�����롥 *** ���ƥ졼������ǤΥ֥��å��ƤӽФ� yield '(' [�� [',' ��...]]) yield -���ƥ졼������ǥ֥��å��θƤӽФ���Ԥʤ�. yield��¹Ԥ�����åɤ� -���ƥ졼���Ȥ��ƸƤӽФ���Ƥ��ʤ����ˤ��㳰��ȯ������. yield ���ͤϥ� -���å�������ͤǤ���. +���ƥ졼������ǥ֥��å��θƤӽФ���Ԥʤ���yield��¹Ԥ�����åɤ� +���ƥ졼���Ȥ��ƸƤӽФ���Ƥ��ʤ����ˤ��㳰��ȯ�����롥yield ���ͤϥ� +���å�������ͤǤ��롥 *** �㳰���� -�������ͽ�����ʤ����֤�ȯ���������ˤ��㳰��ȯ������. Ruby�Ǥ��㳰���� -�����ª����, �ƻ�Ԥ�����, �������Ԥʤä��ꤹ�뤳�Ȥ��Ǥ���. +�������ͽ�����ʤ����֤�ȯ���������ˤ��㳰��ȯ�����롥Ruby�Ǥ��㳰���� +�����ª���ơ��ƻ�Ԥ����ꡤ�������Ԥʤä��ꤹ�뤳�Ȥ��Ǥ��롥 protect ʸ1 @@ -607,49 +605,49 @@ Enumerable�⥸�塼���grep��åɤΤ褦�˥��ƥ졼���Ȥ��ƸƤФ줿���� ʸ3] end -ʸ1��¹Ԥ�, ���μ¹�����㳰��ȯ�������resque��ǻ��ꤵ�줿ʸ2��¹� -����. ����ensure�¸�ߤ������protectʸ��λ��������ɬ��(���ェλ�� -�����Ǥʤ�, �㳰, return, break, continue, redo�ʤɤˤ��æ�ФǤ�)ʸ3 -��¹Ԥ���. +ʸ1��¹Ԥ������μ¹�����㳰��ȯ�������resque��ǻ��ꤵ�줿ʸ2��¹� +���롥����ensure�¸�ߤ������protectʸ��λ��������ɬ��(���ェλ�� +�����Ǥʤ����㳰, return, break, continue, redo�ʤɤˤ��æ�ФǤ�)ʸ3 +��¹Ԥ��롥 -unlessʸ, untilʸ�Ͼ���ɾ����������㳰��ȯ���������, ɾ����̤��� -�Ǥ���ȸ��ʤ��Τ�, ���ۤ��㳰������ԤʤäƤ��뤳�Ȥˤʤ�. +unlessʸ��untilʸ�Ͼ���ɾ����������㳰��ȯ��������硤ɾ����̤��� +�Ǥ���ȸ��ʤ��Τǡ����ۤ��㳰������ԤʤäƤ��뤳�Ȥˤʤ롥 *** ���롼�ԥ� -���ϳ�̤ˤ�äƥ��롼�ԥ��뤳�Ȥ��Ǥ���. +���ϳ�̤ˤ�äƥ��롼�ԥ��뤳�Ȥ��Ǥ��롥 '(' �� ')' -���˳�̤��Ѥ���, ʸ(�ޤ���ʸ���¤�)�ˤ��뤳�Ȥ�Ǥ���. +���˳�̤��Ѥ��ơ�ʸ(�ޤ���ʸ���¤�)�ˤ��뤳�Ȥ�Ǥ��롥 '(' ʸ ';' ʸ... ')' -ʸ���¤Ӥ��ͤϺǸ��ɾ�����������ͤǤ���. �Ĥޤ���ͤϺǸ��ɾ������ʸ -���ͤˤʤ�. +ʸ���¤Ӥ��ͤϺǸ��ɾ�����������ͤǤ��롥�Ĥޤ���ͤϺǸ��ɾ������ʸ +���ͤˤʤ롥 ** ʸ -Ruby�ץ�������������⤦��Ĥ����Ǥ�ʸ�Ǥ���. ʸ�ˤ�ñ��ʸ, ����ʸ, -���ʸ������. ���̤�ʸ���ͤ��Ѥ��뤳�ȤϤʤ���, ���Ȥ����Ѥ������� -�⤢��Τ�, �ͤ����. �̾��ʸ���ͤ�nil�Ǥ���. +Ruby�ץ�������������⤦��Ĥ����Ǥ�ʸ�Ǥ��롥ʸ�ˤ�ñ��ʸ������ʸ�� +���ʸ�����롥���̤�ʸ���ͤ��Ѥ��뤳�ȤϤʤ��������Ȥ����Ѥ������� +�⤢��Τǡ��ͤ���ġ��̾��ʸ���ͤ�nil�Ǥ��롥 *** �� -����ñ��ʸ�Ǥ���. +����ñ��ʸ�Ǥ��롥 *** ¿������ -Ʊ����ʣ�����ѿ���������Ԥʤ����Ȥ��Ǥ���. ���η����ϰʲ����̤�Ǥ���. +Ʊ����ʣ�����ѿ���������Ԥʤ����Ȥ��Ǥ��롥���η����ϰʲ����̤�Ǥ��롥 �ѿ� ',' [�ѿ� ',' ...] ['*' �ѿ�]= �� [, ��...] -���դμ�����Ĥ����ʤ�����, �����ͤ�����Ȥ���(ɬ�פʤ��to_a��� -�ɤ�������Ѵ�����), ���Ǥ줾���ѿ�����������. ����ʳ��ξ��ˤ�, -���줾��μ����ͤ��ѿ������������. ���դ��ѿ��ο��ȱ��դ����Ǥο����� -��ʤ����ˤ���ʤ��ѿ��ˤ� nil����������, ;�ä����Ǥ�̵�뤵���. ¿ -�������κǸ�����Ǥ�����`*'��������, �Ĥ�����ư���������Ȥ������� -�����. +���դμ�����Ĥ����ʤ����ϡ������ͤ�����Ȥ���(ɬ�פʤ��to_a��� +�ɤ�������Ѵ�����)�����Ǥ줾���ѿ����������롥����ʳ��ξ��ˤϡ� +���줾��μ����ͤ��ѿ�����������롥���դ��ѿ��ο��ȱ��դ����Ǥο����� +��ʤ����ˤ���ʤ��ѿ��ˤ� nil���������졤;�ä����Ǥ�̵�뤵��롥¿ +�������κǸ�����Ǥ�����`*'�������硤�Ĥ�����ư���������Ȥ������� +����롥 foo, bar = [1, 2] # foo = 1; bar = 2 foo, bar = 1, 2 # foo = 1; bar = 2 @@ -659,19 +657,19 @@ Ruby�ץ�������������⤦��Ĥ����Ǥ�ʸ�Ǥ���. ʸ�ˤ�ñ��ʸ, ����ʸ, foo, bar = 1, 2, 3 # foo = 1; bar = 2 foo,*bar = 1, 2, 3 # foo = 1; bar = [2, 3] -¿��������ñ��ʸ�Ǥ���. �����ͤ�(������Ѵ����줿)���դǤ���. +¿��������ñ��ʸ�Ǥ��롥�����ͤ�(������Ѵ����줿)���դǤ��롥 *** ����ʸ -�����ή����ѹ�����ʲ���ʸ������. ������ñ��ʸ�Ǥ���. +�����ή����ѹ�����ʲ���ʸ�����롥������ñ��ʸ�Ǥ��롥 returnʸ - return [��[, ��...]] + return [��[',' ��...]] -�����ͤ�����ͤȤ��ƥ�åɤμ¹Ԥ�λ����. ����2�İʾ�Ϳ����줿�� -�ˤ�, ���������ǤȤ���������åɤ�����ͤȤ���. ������Ĥ�ʤ��� -��ˤ� nil ������ͤȤʤ�. +�����ͤ�����ͤȤ��ƥ�åɤμ¹Ԥ�λ���롥����2�İʾ�Ϳ����줿�� +�ˤϡ����������ǤȤ���������åɤ�����ͤȤ��롥������Ĥ�ʤ��� +��ˤ� nil ������ͤȤʤ롥 �롼������ʸ @@ -679,406 +677,406 @@ returnʸ redo break -�嵭3�Ĥϥ롼����ǻȤ�. +�嵭3�Ĥϥ롼����ǻȤ��� -continue�Ϥ�äȤ���¦�Υ롼�פμ��η����֤���Ϥ��. redo�ϥ롼��� -�Υ����å���Ԥʤ鷺, ���ߤη����֤�����ľ��. break �ϥ롼�פ�æ�Ф� -��. C�Ȱ㤤, break�Ϥ�äȤ���¦�Υ롼�פ�æ�Ф�����Ѥ��������, case -��ȴ������Ѥϻ����ʤ�. +continue�Ϥ�äȤ���¦�Υ롼�פμ��η����֤���Ϥ�롥redo�ϥ롼��� +�Υ����å���Ԥʤ鷺�����ߤη����֤�����ľ����break �ϥ롼�פ�æ�Ф� +�롥C�Ȱ㤤��break�Ϥ�äȤ���¦�Υ롼�פ�æ�Ф�����Ѥ����������case +��ȴ������Ѥϻ����ʤ��� retryʸ retry -protectʸ��resque��ǻȤ�, protectʸ��Ϥᤫ��¹Ԥ���. �㳰������Ԥʤ� -�Ƥ���ƻ�Ԥ���Τ˻Ȥ�. resque��ʳ���retry���Ѥ���줿����㳰��ȯ -������. +protectʸ��resque��ǻȤ���protectʸ��Ϥᤫ��¹Ԥ��롥�㳰������Ԥʤ� +�Ƥ���ƻ�Ԥ���Τ˻Ȥ���resque��ʳ���retry���Ѥ���줿����㳰��ȯ +�����롥 failʸ fail '(' [��å�����] ')' fail [��å�����] -�㳰��ȯ��������. ��å�������Ϳ����줿���ˤ�ȯ�������������ե����� -̾, ���ֹ���ƥ��ѿ�`$@'��, ��å�������`$!'�˥��åȤ���. +�㳰��ȯ�������롥��å�������Ϳ����줿���ˤ�ȯ�������������ե����� +̾�����ֹ���ƥ��ѿ�`$@'�ˡ���å�������`$!'�˥��åȤ��롥 yieldʸ yield �� [',' ��...] -ʸ�Ȥ���yield���Ѥ��뤳�Ȥ�Ǥ���. ���ξ��ϼ����̤dz��ɬ�פϤʤ�. +ʸ�Ȥ���yield���Ѥ��뤳�Ȥ�Ǥ��롥���ξ��ϼ����̤dz��ɬ�פϤʤ��� *** ��åɸƤӽФ�ʸ -1�İʾ�ΰ�������ĥ�åɸƤӽФ����ˤ�ۣ�椵���ʤ����, ������� -�̤dz��ɬ�פϤʤ�. ���η����ϰʲ����̤�Ǥ���. +1�İʾ�ΰ�������ĥ�åɸƤӽФ����ˤ�ۣ�椵���ʤ���С�������� +�̤dz��ɬ�פϤʤ������η����ϰʲ����̤�Ǥ��롥 �� '.' ��å�̾ ����1 ',' [����2...]['*' ����n] ��å�̾ ����1 ',' [����2...]['*' ����n] super ����1 ',' [����2... ]['*' ����n] -��ʸ���ϻ���, ���Τ褦�˲��Ǥ�����ϼ��Ȥ��Ƥβ�ͥ�褵���. +��ʸ���ϻ��ˡ����Τ褦�˲��Ǥ�����ϼ��Ȥ��Ƥβ�ͥ�褵��롥 foo bar+baz # ��åɸƤӽФ�foo(bar+baz) foo (bar)+baz # ��åɸƤӽФ�foo(bar) + bar foo 1 # ��åɸƤӽФ�foo(1) foo -1 # ���������ѿ�foo - 1 -��̤Τʤ���åɸƤӽФ�ʸ��ñ��ʸ�Ǥ���. +��̤Τʤ���åɸƤӽФ�ʸ��ñ��ʸ�Ǥ��롥 *** ���潤���� -ñ��ʸ�����潤���Ҥ��ղä�����Τ�ʸ�Ǥ���(ñ��ʸ�ǤϤʤ�). �����Ҥϰ� -����4����Ǥ���. +ñ��ʸ�����潤���Ҥ��ղä�����Τ�ʸ�Ǥ���(ñ��ʸ�ǤϤʤ�)�������Ҥϰ� +����4����Ǥ��롥 ñ��ʸ if �� ñ��ʸ unless �� ñ��ʸ while �� ñ��ʸ until �� -��、����(if/unless)�μ�����Ԥ���ʸ������ä�ɾ�������. ư����б� -������ʬ������Ʊ�ͤǤ���. +��、����(if/unless)�μ�����Ԥ���ʸ������ä�ɾ������롥ư����б� +������ʬ������Ʊ�ͤǤ��롥 �����֤�������(while/until)�Ϥޤ���Ԥ���ʸ��ɾ�����Ƥ����P��ɾ�� -����Τ�, ������٤�ʸ��¹Ԥ��뤳�Ȥˤʤ�. +����Τǡ�������٤�ʸ��¹Ԥ��뤳�Ȥˤʤ롥 *** ���饹���ʸ -���饹��������빽ʸ�ϰʲ����̤�Ǥ���. +���饹��������빽ʸ�ϰʲ����̤�Ǥ��롥 class ���饹̾ [':' �����ѡ����饹̾ ] ������� end -���饹̾��Ǥ�դμ��̻ҤǤ���(��ʸ���ǻϤ�뤳�Ȥ�侩����). ���饹��� -�Υͥ��ȤϤǤ��ʤ��Τ�¾�����ʸ��Ǥϥ��饹������Ǥ��ʤ�. +���饹̾��Ǥ�դμ��̻ҤǤ���(��ʸ���ǻϤ�뤳�Ȥ�侩����)�����饹��� +�Υͥ��ȤϤǤ��ʤ��Τ�¾�����ʸ��Ǥϥ��饹������Ǥ��ʤ��� *** �⥸�塼�����ʸ -�⥸�塼���������빽ʸ�ϰʲ����̤�Ǥ���. +�⥸�塼���������빽ʸ�ϰʲ����̤�Ǥ��롥 module ���饹̾ ������� end -�⥸�塼��̾����ʸ���ǻϤޤ뼱�̻ҤǤ���. ���饹Ʊ��, �⥸�塼������� -�ͥ��ȤǤ��ʤ�. +�⥸�塼��̾����ʸ���ǻϤޤ뼱�̻ҤǤ��롥���饹Ʊ�͡��⥸�塼������� +�ͥ��ȤǤ��ʤ��� *** ���롼��ʸ -�⥸�塼��롼�ɤ��뤳�Ȥˤ�ä�, ���饹�ޤ��ϥ⥸�塼��˵�ǽ -���ɲäǤ���. �⥸�塼��롼�ɤ������, ���Υ⥸�塼��(����� +�⥸�塼��롼�ɤ��뤳�Ȥˤ�äơ����饹�ޤ��ϥ⥸�塼��˵�ǽ +���ɲäǤ��롥�⥸�塼��롼�ɤ�����硤���Υ⥸�塼��(����� ���Υ⥸�塼�뤬���˥��롼�ɤ��Ƥ���⥸�塼��)�����ƤΥ�åɤ� -�����Ѥ�. �̤Τ�������Х��롼�ɤϸ��ꤵ�줿¿�ŷѾ��Ȥ�����. +�����Ѥ����̤Τ�������Х��롼�ɤϸ��ꤵ�줿¿�ŷѾ��Ȥ����롥 -¾�Υ⥸�塼��롼�ɤ��빽ʸ�ϰʲ����̤�Ǥ���. +¾�Υ⥸�塼��롼�ɤ��빽ʸ�ϰʲ����̤�Ǥ��롥 include �⥸�塼��̾ [',' �⥸�塼��̾...] ���ߤ������Υ��饹�ޤ��ϥ⥸�塼��(�ȥåץ�٥�Ǥ�Object���饹)�˻� -�ꤷ���⥸�塼��롼�ɤ���. +�ꤷ���⥸�塼��롼�ɤ��롥 *** ��å����ʸ -�̾�(�ðۥ�åɤǤʤ�)��å�����η����ϰʲ����̤�Ǥ���. �̾��� -������ϥͥ��ȤǤ��ʤ��Τ�, ��å����ʸ��Ǥϥ�å����ʸ��ƤӸ� -�ӽФ��ʤ�. +�̾�(�ðۥ�åɤǤʤ�)��å�����η����ϰʲ����̤�Ǥ��롥�̾��� +������ϥͥ��ȤǤ��ʤ��Τǡ���å����ʸ��Ǥϥ�å����ʸ��ƤӸ� +�ӽФ��ʤ��� def ��å�̾ ['(' ���� [',' ����...][',' '*'���� ] ')'] ������� end -��å�̾�ϼ��̻Ҥޤ���ʸ����Ǥ���. �黻�Ҥκ��������ˤ�ʸ���� -�ǻ��ꤹ��. �������¤ӤκǸ��`*'��������, ���������¿��Ϳ����줿 -�°�����, �Ǹ�ΰ���������Ȥ���Ϳ������(��ʤ����ˤϥ��顼). +��å�̾�ϼ��̻Ҥޤ���ʸ����Ǥ��롥�黻�Ҥκ��������ˤ�ʸ���� +�ǻ��ꤹ�롥�������¤ӤκǸ��`*'�������硤���������¿��Ϳ����줿 +�°����ϡ��Ǹ�ΰ���������Ȥ���Ϳ������(��ʤ����ˤϥ��顼)�� -��åɤˤϴؿ�Ū��åɤ��̾��åɤ�����. �ؿ�Ū��åɤϴؿ��� -���Ǥ����ƤӽФ����Ȥ��Ǥ���, ��äƳ������륯�饹�Ȥ��Υ��֥��饹�Υ� -���åɤ��餷���ƤӽФ����Ȥ��Ǥ��ʤ�. ���饹���ʸ�γ��ˤ���defʸ�ϴ� -��Ū��åɤ������, ���饹���ʸ����ˤ���defʸ���̾�Υ�åɤ��� -������. ��åɤβĻ�����Module���饹��export/noexport��åɤ�Ȥ� -���ѹ�����. +��åɤˤϴؿ�Ū��åɤ��̾��åɤ����롥�ؿ�Ū��åɤϴؿ��� +���Ǥ����ƤӽФ����Ȥ��Ǥ�������äƳ������륯�饹�Ȥ��Υ��֥��饹�Υ� +���åɤ��餷���ƤӽФ����Ȥ��Ǥ��ʤ������饹���ʸ�γ��ˤ���defʸ�ϴ� +��Ū��åɤ�����������饹���ʸ����ˤ���defʸ���̾�Υ�åɤ��� +�����롥��åɤβĻ�����Module���饹��export/noexport��åɤ�Ȥ� +���ѹ����롥 ** �ðۥ�å����ʸ -��å�����ˤϤ⤦����ðۥ�åɤ����������. �ðۥ�åɤȤϤ��� -����Υ��֥������Ȥ˸�ͭ�Υ�åɤǤ���. �����ϰʲ����̤�Ǥ���. +��å�����ˤϤ⤦����ðۥ�åɤ���������롥�ðۥ�åɤȤϤ��� +����Υ��֥������Ȥ˸�ͭ�Υ�åɤǤ��롥�����ϰʲ����̤�Ǥ��롥 def �� '.' ��å�̾ ['(' ���� [',' ����...][',' '*'���� ] ')'] ������� end -���η����ϼ����ͤǤ��륪�֥������Ȥ��ðۥ�åɤ��������. �����ͤ� -(�ӥ�ȥ��饹�Ǥʤ�)�̾索�֥������Ȥ�, ���饹�ޤ��ϥ⥸�塼��Ǥ� -��ɬ�פ�����. �̾��å�����Ȥϰۤʤ�, �ðۥ�åɤϥ�å������� -�Ǥ�ͥ��Ȥ���������뤳�Ȥ��Ǥ���. +���η����ϼ����ͤǤ��륪�֥������Ȥ��ðۥ�åɤ�������롥�����ͤ� +(�ӥ�ȥ��饹�Ǥʤ�)�̾索�֥������Ȥ������饹�ޤ��ϥ⥸�塼��Ǥ� +��ɬ�פ����롥�̾��å�����Ȥϰۤʤꡤ�ðۥ�åɤϥ�å������� +�Ǥ�ͥ��Ȥ���������뤳�Ȥ��Ǥ��롥 -�ðۥ�åɤ��̾�ϷѾ������ʤ���, �㳰�Ȥ��ƥ��饹���ðۥ�åɤϤ� -�Υ��֥��饹�ˤ�Ѿ������. �����ؤ���Х��饹���ðۥ�åɤ�¾�Υ��� -�������Ȼظ������ƥ�ˤ����륯�饹��åɤ�Ư����. +�ðۥ�åɤ��̾�ϷѾ������ʤ������㳰�Ȥ��ƥ��饹���ðۥ�åɤϤ� +�Υ��֥��饹�ˤ�Ѿ�����롥�����ؤ���Х��饹���ðۥ�åɤ�¾�Υ��� +�������Ȼظ������ƥ�ˤ����륯�饹��åɤ�Ư���롥 *** ��åɤ���̾���ʸ -�ʲ��η����ǥ�åɤ���̾��Ĥ��뤳�Ȥ��Ǥ���. +�ʲ��η����ǥ�åɤ���̾��Ĥ��뤳�Ȥ��Ǥ��롥 def ��å�̾1 ��å�̾2 -��̾���դ���줿��åɤ�, ���λ����ǤΥ�å����������Ѥ�, ���Υ� -���åɤ����������Ƥ�, �Ť���åɤ��ƤӽФ��줿�Τ�����Ʊ��Ư���� -��. +��̾���դ���줿��åɤϡ����λ����ǤΥ�å����������Ѥ������Υ� +���åɤ����������Ƥ⡤�Ť���åɤ��ƤӽФ��줿�Τ�����Ʊ��Ư���� +�롥 *** ��å�������ä�ʸ -��åɤ��������ä�����ˤ�undef���Ѥ���. +��åɤ��������ä�����ˤ�undef���Ѥ��롥 undef ��å�̾ -���̻Ҥޤ���ʸ����ǻ��ꤷ����åɤ��������ä�. +���̻Ҥޤ���ʸ����ǻ��ꤷ����åɤ��������ä��� def�ˤ����̾�����undef�ˤ��������ä���Ȥ��ȥ��饹�Υ��ե��� -�����ѡ����饹����Ω���ѹ����뤳�Ȥ��Ǥ���. ������, ��åɤ�self +�����ѡ����饹����Ω���ѹ����뤳�Ȥ��Ǥ��롥����������åɤ�self �˥�å����������äƤ�����ˤϤ褯���դ��ʤ��ȴ�¸�Υ�åɤ�ư� -�ʤ��ʤ��ǽ��������. +�ʤ��ʤ��ǽ�������롥 ------------------------------------------------------- * Ruby���Ȥ߹��ߵ�ǽ -Ruby�ץ�����ߥδ��ܤϥ��饹, �⥸�塼��Ȥ��Υ�åɤν����Ǥ���. -Ruby�ˤϽ����Ϥ��Τ�Τ˰ʲ��ε�ǽ���Ȥ߹��ޤ�Ƥ���. �饤�֥������ -�ɤ��뤳�Ȥˤ�äƵ�ǽ�������뤬, �����˴ؤ��ƤϤ��줾��Υ饤�֥�� -�Υɥ�����ȤȤ��Ƥ�餤����. +Ruby�ץ�����ߥδ��ܤϥ��饹���⥸�塼��Ȥ��Υ�åɤν����Ǥ��롥 +Ruby�ˤϽ����Ϥ��Τ�Τ˰ʲ��ε�ǽ���Ȥ߹��ޤ�Ƥ��롥�饤�֥������ +�ɤ��뤳�Ȥˤ�äƵ�ǽ�������뤬�������˴ؤ��ƤϤ��줾��Υ饤�֥�� +�Υɥ�����ȤȤ��Ƥ�餤������ ** �ؿ� Ruby�ˤϸ�̩�ʰ�̣�Ǥϴؿ��Ϥʤ���Kernel���饹�δؿ���åɤ�(���Ƥ� -�̾說�饹����ؿ������ǸƤӽФ���Τ�), �ؿ�Ū���Ѥ�����. �ؿ�Ū�� -�Ѥ������åɤ�ʲ��ˤ�����. �����Υ�åɤ���������ݤˤϸ� -������ͤ��ƹԤʤ��٤��Ǥ���. +�̾說�饹����ؿ������ǸƤӽФ���Τ�)���ؿ�Ū���Ѥ����롥�ؿ�Ū�� +�Ѥ������åɤ�ʲ��ˤ����롥�����Υ�åɤ���������ݤˤϸ� +������ͤ��ƹԤʤ��٤��Ǥ��롥 _exit(status) - �ץ������μ¹Ԥ�λ����. ����status��λ���ơ������Ȥ���. - exit()�Ȥϰ�ä�, �㳰�����ʤɤϰ��ڹԤʤ�ʤ�. fork()�θ�, �� - �ץ�������λ��������ʤɤ��Ѥ���. + �ץ������μ¹Ԥ�λ���롥����status��λ���ơ������Ȥ��롥 + exit()�Ȥϰ�äơ��㳰�����ʤɤϰ��ڹԤʤ�ʤ���fork()�θ塤�� + �ץ�������λ��������ʤɤ��Ѥ��롥 eof() - ���ޥ�ɥ饤������Ϥ�EOF����ã���Ƥ�����, �����֤�. + ���ޥ�ɥ饤������Ϥ�EOF����ã���Ƥ����硤�����֤��� eval(expr) - expr�Ȥ���Ϳ����줿ʸ�����ruby�ץ������Ȥ��Ʋ��,�¹Ԥ���. + expr�Ȥ���Ϳ����줿ʸ�����ruby�ץ������Ȥ��Ʋ�ᡤ�¹Ԥ��롥 exec(command) - ���¹Ԥ��Ƥ���ץ�������λ����, commandʸ����ǻ��ꤵ��� - �̥ץ�������ư����. + ���¹Ԥ��Ƥ���ץ�������λ���ơ�commandʸ����ǻ��ꤵ��� + �̥ץ�������ư���롥 exit([status]) - �ץ������μ¹Ԥ�λ����. status�Ȥ���������Ϳ����줿���, - �����ͤ�Ruby���ޥ�ɤν�λ���ơ������Ȥ���. �ǥե���Ȥ�0. + �ץ������μ¹Ԥ�λ���롥status�Ȥ���������Ϳ����줿��硤 + �����ͤ�Ruby���ޥ�ɤν�λ���ơ������Ȥ��롥�ǥե���Ȥ�0�� fork() - fork�����ƥॳ�����¹Ԥ�, �ҥץ���������������. �ܺ٤� - fork(2)�ȤΤ���. �ƥץ�����¦�Ǥϻҥץ������Υץ�����id�� - �֤�, �ҥץ�����¦�Ǥ�nil���֤�. ���餫�θ����ǻҥץ��������� - ���˼��Ԥ������ˤ��㳰��ȯ������. + fork�����ƥॳ�����¹Ԥ����ҥץ��������������롥�ܺ٤� + fork(2)�ȤΤ��ȡ��ƥץ�����¦�Ǥϻҥץ������Υץ�����id�� + �֤����ҥץ�����¦�Ǥ�nil���֤������餫�θ����ǻҥץ��������� + ���˼��Ԥ������ˤ��㳰��ȯ�����롥 format(format, ...) �ե����ޥåȤȤ���Ϳ����줿ʸ�����C�����sprintf��Ʊ���褦�� - ��ᤷ, ������Ÿ������ʸ������֤�. ��å�sprintf()����̾. + ��ᤷ��������Ÿ������ʸ������֤�����å�sprintf()����̾�� Ruby�ˤ�����format����Ҥγ�ĥ�ˤĤ��Ƥ�sprintf()�ι�Ȥ� - ����. + ���ȡ� getc() - ɸ�����Ϥ����ʸ�����Ф�. ����ͤ��ɤ߹����ʸ����ʸ�������� - (ASCII)��ɽ��Fixnum�Ǥ���. + ɸ�����Ϥ����ʸ�����Ф�������ͤ��ɤ߹����ʸ����ʸ�������� + (ASCII)��ɽ��Fixnum�Ǥ��롥 getenv(name) - name�˳�������Ķ��ѿ�����Ф�. $ENV[name]��Ʊ��. + name�˳�������Ķ��ѿ�����Ф���$ENV[name]��Ʊ���� gets() �����Ȥ���Ϳ����줿�ե�����(�ʤ����ɸ������)�ǹ�������벾�� - Ū�ʥե�����($ARGF�ǥ��������Ǥ���)�������ɤ߹����, �ɤ߹� - �ߤ������������ˤϤ���ʸ������֤�. �ե�����ν������ã������ - �ˤ�nil���֤�. �Ԥζ��ڤ�ϥ����ƥ��ѿ�`$/'�ˤ�ä��ѹ��Ǥ���. - �ɤ߹����ʸ����ϥ����ƥ��ѿ�`$_'�ˤ⥻�åȤ����. + Ū�ʥե�����(�����ƥ��ѿ�`$<'�ǥ��������Ǥ���)�������ɤ߹��� + �ǡ��ɤ߹��ߤ������������ˤϤ���ʸ������֤����ե�����ν���� + ��ã�������ˤ�nil���֤����Ԥζ��ڤ�ϥ����ƥ��ѿ�`$/'�ˤ�ä� + �ѹ��Ǥ��롥�ɤ߹����ʸ����ϥ����ƥ��ѿ�`$_'�ˤ⥻�åȤ���롥 gsub(pattern, replace) - �����ƥ��ѿ�`$_'�λؤ�ʸ������Ф����ִ���Ԥʤ�. ʸ������� - pattern�˥ޥå�������ʬ������replace���֤�������. String���饹 - ��gsub��åɤβ���ȤΤ���. gsub��åɤ�`$_'���ͤ� - ����. + �����ƥ��ѿ�`$_'�λؤ�ʸ������Ф����ִ���Ԥʤ���ʸ������� + pattern�˥ޥå�������ʬ������replace���֤������롥String���饹 + ��gsub��åɤβ���ȤΤ��ȡ�gsub��åɤ�`$_'���ͤ� + ���롥 iterator_p() - ��åɤ����ƥ졼���Ȥ��ƸƤӽФ��줿���˿�, �����Ǥʤ����˵� - ���֤��Ҹ�. + ��åɤ����ƥ졼���Ȥ��ƸƤӽФ��줿���˿��������Ǥʤ����˵� + ���֤��Ҹ졥 kill(signal, pid...) - pid�ǻ��ꤵ�줿�ץ������˥����ʥ������. �����ʥ�ϥ����ʥ��� - �椫̾���ǻ��ꤹ��. ����ͤ���ĥ����ʥ�(���뤤�ϥ����ʥ�̾�� + pid�ǻ��ꤵ�줿�ץ������˥����ʥ�����롥�����ʥ�ϥ����ʥ��� + �椫̾���ǻ��ꤹ�롥����ͤ���ĥ����ʥ�(���뤤�ϥ����ʥ�̾�� ����`-')��Ϳ����ȥץ������ǤϤʤ��ץ��������롼�פ˥����ʥ�� - ����. + ���롥 load(file) - file������ɤ���. file������ɤ���ѥ��ϥ����ƥ��ѿ�$LOAD_PATH - �Ƿ��ꤵ���. + file������ɤ��롥file������ɤ���ѥ��ϥ����ƥ��ѿ�$LOAD_PATH + �Ƿ��ꤵ��롥 open(file[, mode]) - file���ץ�, File���֥������Ȥ��֤�. �ե�����̾�ϥ����� - ��ե������. �ե�����̾��`|'�ǻϤޤ���ˤ�³��ʸ���� - �ޥ�ɤȤ��Ƶ�ư��, �ѥ��ץ饤�����������. + file���ץơ�File���֥������Ȥ��֤����ե�����̾�ϥ����� + ��ե���������ե�����̾��`|'�ǻϤޤ���ˤ�³��ʸ���� + �ޥ�ɤȤ��Ƶ�ư�����ѥ��ץ饤����������롥 - ���ޥ��̾��"-"�Ǥ����, open()��Ruby�λҥץ�������������, �� - �λҥץ������ȤΥѥ��פ��֤�. + ���ޥ��̾��"-"�Ǥ������open()��Ruby�λҥץ����������������� + �λҥץ������ȤΥѥ��פ��֤��� - mode�ϥե�����Υ��������⡼�ɤ���ꤹ��. ����ϰʲ��Τ����Τ� - ���줫��ʸ����Ǥ���. + mode�ϥե�����Υ��������⡼�ɤ���ꤹ�롥����ϰʲ��Τ����Τ� + ���줫��ʸ����Ǥ��롥 - r �ɤ߹�������. open����ե�����Ϥ��餫����¸�ߤ��Ƥ��� - ɬ�פ�����. + r �ɤ߹������ѡ�open����ե�����Ϥ��餫����¸�ߤ��Ƥ��� + ɬ�פ����롥 - r+ �ɤ߽�ξ��. open����ե�����Ϥ��餫����¸�ߤ��Ƥ��� - ɬ�פ�����. + r+ �ɤ߽�ξ�ѡ�open����ե�����Ϥ��餫����¸�ߤ��Ƥ��� + ɬ�פ����롥 - w ��������. �ե����뤬¸�ߤ��Ƥ������, Ĺ����0�ˤ� - ��. ¸�ߤ��Ƥ��ʤ���п����˥ե�������������. + w �������ѡ��ե����뤬¸�ߤ��Ƥ�����硤Ĺ����0�ˤ� + �롥¸�ߤ��Ƥ��ʤ���п����˥ե������������롥 - w+ �ɤ߽�ξ��. �ɤ߹��ߤ��Ԥʤ��뤳�Ȱʳ���"w"��Ʊ��Ư�� - ��. + w+ �ɤ߽�ξ�ѡ��ɤ߹��ߤ��Ԥʤ��뤳�Ȱʳ���"w"��Ʊ��Ư�� + �롥 - a �ɲý�������. �ե�����Ϥ��餫����¸�ߤ��Ƥ���ɬ�� - ������. ���ߤϥե�����κǸ���ɲä����. + a �ɲý������ѡ��ե�����Ϥ��餫����¸�ߤ��Ƥ���ɬ�� + �����롥���ߤϥե�����κǸ���ɲä���롥 - a+ �ɤ߽�ξ��. �ե����뤬¸�ߤ��Ƥ��ʤ���п����˺����� - ��. �����������֤ϥե�����κǸ�˽���������. + a+ �ɤ߽�ξ�ѡ��ե����뤬¸�ߤ��Ƥ��ʤ���п����˺����� + �롥�����������֤ϥե�����κǸ�˽��������롥 - �⡼�ɤ���ά���줿���Υǥե���Ȥ�"r"�Ǥ���. + �⡼�ɤ���ά���줿���Υǥե���Ȥ�"r"�Ǥ��롥 print(arg1, ..., argn) - �������˽��Ϥ���. ������Ϳ�����ʤ����ˤϥ쥷���Ф���Ϥ���. - ʸ����ʳ��Υ��֥������Ȥ������Ȥ���Ϳ����줿���ˤ�, ������ - �֥������Ȥ�to_s��åɤˤ�ä�ʸ������Ѵ����Ƥ�����Ϥ����. + �������˽��Ϥ��롥������Ϳ�����ʤ����ˤϥ쥷���Ф���Ϥ��롥 + ʸ����ʳ��Υ��֥������Ȥ������Ȥ���Ϳ����줿���ˤϡ������� + �֥������Ȥ�to_s��åɤˤ�ä�ʸ������Ѵ����Ƥ�����Ϥ���롥 �����ƥ��ѿ�`$;'(���ϥե�����ɥ��ѥ졼��)��nil�Ǥʤ��ͤ����� - �Ȥ���Ƥ�����ˤ�, �ư����δ֤ˤ���ʸ�������Ϥ���. �����ƥ� + �Ȥ���Ƥ�����ˤϡ��ư����δ֤ˤ���ʸ�������Ϥ��롥�����ƥ� �ѿ�`$\'(���ϥե�����ɥ��ѥ졼��)��nil �Ǥʤ��ͤ����åȤ���� - ������ˤ�, �Ǹ�ˤ������Ϥ���. + ������ˤϡ��Ǹ�ˤ������Ϥ��롥 printf([port, ]format, arg1, ..., argn) - C�����printf()��Ʊ��format�˽���������ʸ������Ѵ���, ���Ϥ� - ��. ��1������IO�Υ��֥��饹�Υ����Ǥ��ä����Ϥ��Υ� - �֥������Ȥ��Ф��ƽ��Ϥ�Ԥʤ�. �ǥե���Ȥ�$stdout�˽��Ϥ���. + C�����printf()��Ʊ��format�˽���������ʸ������Ѵ��������Ϥ� + �롥��1������IO�Υ��֥��饹�Υ����Ǥ��ä����Ϥ��Υ� + �֥������Ȥ��Ф��ƽ��Ϥ�Ԥʤ����ǥե���Ȥ�$stdout�˽��Ϥ��롥 Ruby�ˤ�����format����Ҥγ�ĥ�ˤĤ��Ƥ�sprintf()�ι�Ȥ� - ����. + ���ȡ� rand(max) - 0����max��ۤ��ʤ��ϰϤ������������ȯ������. ����ͤ�Fixnum. + 0����max��ۤ��ʤ��ϰϤ������������ȯ�����롥����ͤ�Fixnum�� require(file) - file������ɤ���. load�Ȥ�ư��ΰ㤤��require�ϥ����ɤ����ե� - ����Υե�ѥ����ѿ�$LOAD_FILES�˳Ф��Ƥ���, ���˥����ɤ����ե� - ����Ϻƥ����ɤ��ʤ����Ǥ���. �ºݤ˥����ɤ������ˤ�%TRUE, �� - �˥����ɤ���Ƥ�����ˤ�%FALSE���֤�. + file������ɤ��롥load�Ȥ�ư��ΰ㤤��require�ϥ����ɤ����ե� + ����Υե�ѥ����ѿ�`$"'�˳Ф��Ƥ��ơ����˥����ɤ����ե������ + �ƥ����ɤ��ʤ����Ǥ��롥�ºݤ˥����ɤ������ˤ�%TRUE�����˥��� + �ɤ���Ƥ�����ˤ�%FALSE���֤��� select(reads[, writes[, execpts[, timeout]]]) - select(2)��¹Ԥ���. reads/writes/execpts�ˤ�IO(�ޤ��Ϥ��Υ��� - ���饹)�Υ����������Ϳ����. timeout��Fixnum / Float - / Time�Τ����줫�ǻ��ꤹ��. ����ͤ�timeout����Ω�������ˤ� - nil, �����Ǥʤ��Ȥ���3���Ǥ�������֤�, ���γ����Ǥ�����/����/ - �㳰�Ԥ��Υ��֥������Ȥ����ǤȤ��ƻ���. + select(2)��¹Ԥ��롥reads/writes/execpts�ˤ�IO(�ޤ��Ϥ��Υ��� + ���饹)�Υ����������Ϳ���롥timeout��Fixnum / Float + / Time�Τ����줫�ǻ��ꤹ�롥����ͤ�timeout����Ω�������ˤ� + nil�������Ǥʤ��Ȥ���3���Ǥ�������֤������γ����Ǥ�����/����/ + �㳰�Ԥ��Υ��֥������Ȥ����ǤȤ��ƻ��ġ� setenv(name, value) - name�ǻ��ꤵ���Ķ��ѿ���value�˥��åȤ���. $ENV[name]=value - ��Ʊ��Ư����. + name�ǻ��ꤵ���Ķ��ѿ���value�˥��åȤ��롥$ENV[name]=value + ��Ʊ��Ư���롥 sleep([sec]) - sec�ä����ץ������μ¹Ԥ���ߤ���. sec����ά���줿���, �ץ� - ������SIGALRM�������ʤ��¤�, �ʵפ˥���פ���. �ºݤ˥�� - �פ����ÿ����֤�. + sec�ä����ץ������μ¹Ԥ���ߤ��롥sec����ά���줿��硤�ץ� + ������SIGALRM�������ʤ��¤ꡤ�ʵפ˥���פ��롥�ºݤ˥�� + �פ����ÿ����֤��� sprintf(format, ...) - formatʸ�����C�����sprintf��Ʊ���褦�˲�ᤷ, ������Ÿ������ - ʸ������֤�. ��å�format()����̾. + formatʸ�����C�����sprintf��Ʊ���褦�˲�ᤷ��������Ÿ������ + ʸ������֤�����å�format()����̾�� - format����Ҥ�C�����sprintf()�������դ�����(������, Ruby�� - �� unsigned���ʤ��Τ�, %u�Ͻ���)�˲ä���, %b, %B, %O, %X��Ȥ� - ���Ȥ��Ǥ���. %b�Ͽ��ͤ�2��ɽ��, %B, %O, %X��, ���줾��, 2��, - 8 ��, 16�ʿ���ɽ����Ԥʤ���, ��ο��ν����κݤ�2�����ɽ���� - �Ϥʤ�, ����������ɽ������Ƭ��`-'��Ĥ�����Τ�ɽ������. + format����Ҥ�C�����sprintf()�������դ�����(��������Ruby�� + �� unsigned���ʤ��Τǡ�%u�Ͻ���)�˲ä���, %b, %B, %O, %X��Ȥ� + ���Ȥ��Ǥ��롥%b�Ͽ��ͤ�2��ɽ����%B, %O, %X�Ϥ��줾��2�ʡ�8�ʡ� + 16�ʿ���ɽ����Ԥʤ�������ο��ν����κݤ�2�����ɽ���ǤϤʤ��� + ����������ɽ������Ƭ��`-'��Ĥ�����Τ�ɽ�����롥 srand([�����]) - ����ν���ͤ����ꤷ, �Ť�����ͤ��֤�. ����ͤ���ά���줿���� - ��time(3)���֤��ͤ�ǥե���ȤȤ���. + ����ν���ͤ����ꤷ���Ť�����ͤ��֤�������ͤ���ά���줿���� + ��time(3)���֤��ͤ�ǥե���ȤȤ��롥 sub(pattern, replace) - �����ƥ��ѿ�`$_'�λؤ�ʸ������Ф����ִ���Ԥʤ�. ʸ������Ǻ� - ���pattern�˥ޥå�������ʬ��replace���֤�������. sub��å� - ��`$_'���ͤ�����. ����¾�ξܺ٤˴ؤ��Ƥ�String���饹��sub - ��åɤβ���ȤΤ���. + �����ƥ��ѿ�`$_'�λؤ�ʸ������Ф����ִ���Ԥʤ���ʸ������Ǻ� + ���pattern�˥ޥå�������ʬ��replace���֤������롥sub��å� + ��`$_'���ͤ����롥����¾�ξܺ٤˴ؤ��Ƥ�String���饹��sub + ��åɤβ���ȤΤ��ȡ� syscall(num, arg...) - num�ǻ��ꤵ�줿�ֹ�Υ����ƥॳ�����¹Ԥ���. ��2�����ʹߤ� - ���ƥॳ����ΰ����Ȥ����Ϥ�. ������ʸ����ޤ��������Ǥʤ���� - �ʤ�ʤ�. + num�ǻ��ꤵ�줿�ֹ�Υ����ƥॳ�����¹Ԥ��롥��2�����ʹߤ� + ���ƥॳ����ΰ����Ȥ����Ϥ���������ʸ����ޤ��������Ǥʤ���� + �ʤ�ʤ��� system(command) - ���ޥ�ɤ�¹Ԥ�, ���ν�λ���ơ��������֤�. + ���ޥ�ɤ�¹Ԥ������ν�λ���ơ��������֤��� trap(command, signal...) - signal�γ����ߤ������ä�����command��¹Ԥ���. signal�ϥ��� - �ʥ�̾�������ʥ���ֹ�. command�Ȥ���"SIG_IGN"�ޤ���"IGNORE"�� - ���ꤷ�����ˤϤ��Υ����ʥ��̵�뤹��(��ǽ�ʤ��). "SIG_DFL"�� - ����"DEFAULT"����ꤷ�����ϥǥե���Ȥ�ư���Ԥʤ�. + signal�γ����ߤ������ä�����command��¹Ԥ��롥signal�ϥ��� + �ʥ�̾�������ʥ���ֹ桥command�Ȥ���"SIG_IGN"�ޤ���"IGNORE"�� + ���ꤷ�����ˤϤ��Υ����ʥ��̵�뤹��(��ǽ�ʤ��)��"SIG_DFL"�� + ����"DEFAULT"����ꤷ�����ϥǥե���Ȥ�ư���Ԥʤ��� wait() - �ҥץ���������λ����Τ��Ԥ�, ��λ�����ҥץ�������pid���֤�. - �ҥץ���������Ĥ�ʤ����nil���֤�. + �ҥץ���������λ����Τ��Ԥ�����λ�����ҥץ�������pid���֤��� + �ҥץ���������Ĥ�ʤ����nil���֤��� waitpid(pid, flags) - ����λҥץ������ν�λ���Ԥ�, ���Υץ���������λ�������˿����� - ��. �ҥץ�������¸�ߤ��ʤ���, �Υ�֥��å��⡼�ɤǻҥץ��� - �����ޤ���λ���Ƥ��ʤ����ˤ�nil���֤�. waitpid(2)��wait4(2)�� + ����λҥץ������ν�λ���Ԥ������Υץ���������λ�������˿����� + �����ҥץ�������¸�ߤ��ʤ������Υ�֥��å��⡼�ɤǻҥץ��� + �����ޤ���λ���Ƥ��ʤ����ˤ�nil���֤���waitpid(2)��wait4(2)�� ��������Ƥ��ʤ��ޥ���Ǥ�flags�Ϥ��Ĥ�nil�ޤ���0�Ǥʤ���Ф� - ��ʤ�. + ��ʤ��� ** �����ƥ��ѿ� - $! ���顼��å�����. fail�����ꤹ��. + $! ���顼��å�������fail�����ꤹ�롥 $@ ���顼��ȯ�����������Υե�����̾�ȹ��ֹ椬 "�ե�����:���ֹ�[:��å�̾(�����)]" - �η����dz�Ǽ�����. + �η����dz�Ǽ����롥 $& �Ǹ�����������ѥ�����ޥå� @@ -1089,77 +1087,82 @@ Ruby�ˤϸ�̩�ʰ�̣�Ǥϴؿ��Ϥʤ���Kernel���饹�δؿ���åɤ�(���Ƥ� $+ �Ǹ�θ����ѥ�����ǥޥå������Ǹ�γ�� $1..$9 �Ǹ�����������ѥ�����ޥå���n���ܤγ�̤˥ޥå����� - �ͤ���Ǽ�����. ���������̤��ʤ����nil�����äƤ���. + �ͤ���Ǽ����롥���������̤��ʤ����nil�����äƤ��롥 - $~ �Ǹ�Υޥå��˴ؤ������. ����åȤ����$&��$1..$9 - ���ͤ��Ѳ�����. + $~ �Ǹ�Υޥå��˴ؤ��������åȤ����$&��$1..$9 + ���ͤ��Ѳ����롥 - $= �����ѿ����ͤ�nil�Ǥʤ���, �ѥ�����ޥå���ʸ������� - �Ӥǥ���ե��٥åȤ���ʸ����ʸ������̤��ʤ�. �ǥե��� - �Ȥ�nil(���̤���). + $= �����ѿ����ͤ�nil�Ǥʤ������ѥ�����ޥå���ʸ������� + �Ӥǥ���ե��٥åȤ���ʸ����ʸ������̤��ʤ����ǥե��� + �Ȥ�nil(���̤���)�� - $/ ���ϥ쥳���ɥ��ѥ졼��. �ե������ʸ������Ф���each�� - �Ԥʤ�����ʬ��ʸ������ꤹ��. $/�˶�ʸ����("")����ꤹ - �������ñ�̤����Ϥ�Ԥʤ�, nil����ꤹ������Τ���� - ���ɤ߹���. $/�ˤ�����ɽ���ϻȤ��ʤ�. �ǥե���Ȥ� - "\n". + $/ ���ϥ쥳���ɥ��ѥ졼�����ե������ʸ������Ф���each�� + �Ԥʤ�����ʬ��ʸ������ꤹ�롥$/�˶�ʸ����("")����ꤹ + �������ñ�̤����Ϥ�Ԥʤ���nil����ꤹ������Τ���� + ���ɤ߹��ࡥ$/�ˤ�����ɽ���ϻȤ��ʤ����ǥե���Ȥ� + "\n"�� - $\ ���ϥ쥳���ɥ��ѥ졼��. �����ѿ���ʸ�������ꤹ��� + $\ ���ϥ쥳���ɥ��ѥ졼���������ѿ���ʸ�������ꤹ��� write()��print()���٤˺Ǹ�ˤ���ʸ������ղä��ƽ��Ϥ� - ��. �ǥե���Ȥ�nil(�ʤˤ��ɲä��ʤ�). + �롥�ǥե���Ȥ�nil(�ʤˤ��ɲä��ʤ�)�� - $, Array:join()�Υǥե���Ȥζ��ڤ�ʸ����. print()�γư� - ���δ֤˽��Ϥ����ʸ����. + $, Array:join()�Υǥե���Ȥζ��ڤ�ʸ����print()�γư� + ���δ֤˽��Ϥ����ʸ���� - $; String:split()�Υǥե���Ȥζ��ڤ�ʸ��. + $; String:split()�Υǥե���Ȥζ��ڤ�ʸ���� - $. �Ǹ���ɤ�����ϥե�����ι��ֹ�. + $. �Ǹ���ɤ�����ϥե�����ι��ֹ桥 - $< ���ۥե�����$ARGF�Ǹ����ɤ߹������(��å�gets()���� - �ɤ�Ǥ���)�ե�����̾��(�Ф���: `<'�ϥ���������ϻ���) + $< ����(�ʤ����ɸ������)�ǹ�������벾�ۥե����롥�Ĥޤ� + gets()��$<.gets()��Ʊ����̣�Ǥ��롥$<.file�Ǹ����ɤ߹� + ����Υե����륪�֥������Ȥ���$<.filename�Ǥ��Υե��� + ��̾�������롥(�Ф���: `<'�ϥ���������ϸ�����) - $> print��printf�Υǥե���Ȥν�����. ����ͤ�$stdout�� - (�Ф���: `>'�ϥ�����ν��������) + $> print��printf�Υǥե���Ȥν����补����ͤ�$stdout��-i + ���ץ�������ꤷ�����ˤ��ɤ߹��߸���Ʊ��̾���Υե� + ���롥(�Ф���: `>'�ϥ�����ν��������) - $_ �Ǹ��gets()�ʤɤ��ɤ߹����ʸ����. + $_ �Ǹ��gets()�ʤɤ��ɤ߹����ʸ���� - $0 ruby������ץȤ�̾��. �����ѿ������������ps(1)�ν��� - ���Ѳ�����. + $0 ruby������ץȤ�̾���������ѿ������������ps(1)�ν��� + ���Ѳ����롥 - $* ruby������ץȤ�Ϳ����줿����. ruby���Ȥ��Ф�������� - ��������Ƥ���. + $* ruby������ץȤ�Ϳ����줿������ruby���Ȥ��Ф�������� + ��������Ƥ��롥 - $$ ���¹����ruby�ץ�������pid. + $$ ���¹����ruby�ץ�������pid�� - $? �Ǹ�˼¹Ԥ����ҥץ�������status. + $? �Ǹ�˼¹Ԥ����ҥץ�������status�� $: �ե����������ɤ�����˸�������ǥ��쥯�ȥ�ؤΥѥ��� - �ޤ�����. ��ư���ˤϥǥե������(����ѥ�����˻��ꤹ - ��)�˲ä���, �Ķ��ѿ�RUBYLIB���ͤ�ruby��ư����-I���ץ��� + �ޤ�����ư���ˤϥǥե������(����ѥ�����˻��ꤹ + ��)�˲ä��ơ��Ķ��ѿ�RUBYLIB���ͤ�ruby��ư����-I���ץ��� ��ǻ��ꤵ�줿�ͤ��ɲä���롥(�Ф���: ������ϴĶ��� ��PATH�ζ��ڤ�ʸ���Ǥ���) - $" �����ɤ��줿�ե�����̾��ޤ�����Ʊ���ե������2����� - �ɤ��ʤ�������Ѥ����롥(�Ф���: prevent files to be - doubly quoted(loaded)) - - $ARGV $*��Ʊ��. + $" ���˥����ɤ��줿�ե�����̾��ޤ�����require()��Ʊ�� + �ե������2������ɤ��ʤ�������Ѥ����롥(�Ф���: + prevent files to be doubly quoted(loaded)) - $ENV �Ķ��ѿ��˥�����������Ϣ������. + $ARGF $<����̾�� - $FILENAME $<��Ʊ���� + $ARGV $*����̾�� $DEBUG `-d'�ե饰�ξ���(������)�� - $LOAD_PATH $:��Ʊ���� + $ENV �Ķ��ѿ��˥�����������Ϣ������ʸ������Ȥ���Ϳ�� + ����б�����Ķ��ѿ����ͤ������롥�Ķ��ѿ���¸�ߤ��� + ������nil���֤롥 + + $FILENAME ���ۥե�����`$<'�Ǹ����ɤ߹������(��å�gets()���� + �ɤ�Ǥ���)�ե�����̾��$<.filename��Ʊ���� + + $LOAD_PATH $:����̾�� $stdin ɸ������ $stdout ɸ����� $stderr ɸ�२�顼���� - $ARGF ����(�ʤ����ɸ������)�ǹ�������벾�ۥե�����. �Ĥޤ� - gets()��$ARGF.gets()��Ʊ����̣�Ǥ���. - $VERBOSE `-v'�ե饰�ξ���(������) $VERSION ruby�ΥС�������ʸ���� @@ -1169,12 +1172,12 @@ Ruby�ˤϸ�̩�ʰ�̣�Ǥϴؿ��Ϥʤ���Kernel���饹�δؿ���åɤ�(���Ƥ� %TRUE t %FALSE nil - ���줾�쿿���ͤ�ɽ��. ���Ƚ�Ǥ�nil��, ����ʳ������Ƥ��ͤ� - ���Ȥ���Ƚ�Ǥ��뤿��, %TRUE���ͤ���ɽŪ�ʿ����ͤȤ����ʾ�ΰ� - ̣������ʤ�. ��ä�, �����åɤ����ͤ����Ǥ���Ȥ������Ȥ�, + ���줾�쿿���ͤ�ɽ�������Ƚ�Ǥ�nil������ʳ������Ƥ��ͤ� + ���Ȥ���Ƚ�Ǥ��뤿�ᡤ%TRUE���ͤ���ɽŪ�ʿ����ͤȤ����ʾ�ΰ� + ̣������ʤ�����äơ������åɤ����ͤ����Ǥ���Ȥ������Ȥȡ� ���줬%TRUE���֤��Ȥ������Ȥϸ�̩�ˤ�Ʊ���ǤϤʤ�(�Ҹ�Ū���Ѥ� �����åɤ������ͤȤ���%TRUE���֤��褦�ˤϤʤäƤ��� - ��). �Ĥޤ� + ��)���Ĥޤ� if some.method() then .. else .. end @@ -1182,15 +1185,15 @@ Ruby�ˤϸ�̩�ʰ�̣�Ǥϴؿ��Ϥʤ���Kernel���饹�δؿ���åɤ�(���Ƥ� if some.method() == %TRUE then .. else .. end - �ϴ����ˤ�Ʊ���ǤϤʤ�. %FALSE�˴ؤ��Ƥ�, ���Τ褦����������� - �ʤ�. + �ϴ����ˤ�Ʊ���ǤϤʤ���%FALSE�˴ؤ��Ƥϡ����Τ褦����������� + �ʤ��� ** ���饹/�⥸�塼�� *** Array(���饹) -������ź���Ȥ�������Υ��饹�Ǥ���. �����ϰ���Ū�ˤ�����``[...]''�� -�Ԥʤ���. +������ź���Ȥ�������Υ��饹�Ǥ��롥�����ϰ���Ū�ˤ�����``[...]''�� +�Ԥʤ��롥 SuperClass: Object @@ -1202,21 +1205,21 @@ Methods: self[start..end] self[start, length] - ��������Ǥ˥�����������. �ǽ�η����Ǥ������nth���ܤ����Ǥ� - �֤�, 2���ܤη����Ǥ�start���ܤ����Ǥ���end���ܤ����Ǥ�ޤ��� - ʬ������֤�. 3���ܤη����Ǥ�start���ܤ���length�Ĥ����Ǥ�ޤ� - ��ʬ������֤�. + ��������Ǥ˥����������롥�ǽ�η����Ǥ������nth���ܤ����Ǥ� + �֤���2���ܤη����Ǥ�start���ܤ����Ǥ���end���ܤ����Ǥ�ޤ��� + ʬ������֤���3���ܤη����Ǥ�start���ܤ���length�Ĥ����Ǥ�ޤ� + ��ʬ������֤��� self[nth] = val self[start..end] = val self[start, length] = val - ��������Ǥ��ѹ�����. �ǽ�η����Ǥ������nth���ܤ����Ǥ�val�� - �ѹ�����. 2���ܤη�����start���ܤ����Ǥ���end���ܤ����ǤޤǤ� - val���ѹ�����. 3���ܤη����Ǥ�start���ܤ���length�Ĥ����Ǥ�val - ���ѹ�����. + ��������Ǥ��ѹ����롥�ǽ�η����Ǥ������nth���ܤ����Ǥ�val�� + �ѹ����롥2���ܤη�����start���ܤ����Ǥ���end���ܤ����ǤޤǤ� + val���ѹ����롥3���ܤη����Ǥ�start���ܤ���length�Ĥ����Ǥ�val + ���ѹ����롥 - 2����, 3���ܤη����Ǥ�val������Ǥʤ���Фʤ�ʤ�. + 2���ܡ�3���ܤη����Ǥ�val������Ǥʤ���Фʤ�ʤ��� ��: @@ -1226,12 +1229,12 @@ Methods: self + other - �����Ϣ��. self��other��ξ������������Ƥ�Ҥ�������������� - �֤�. + �����Ϣ�롥self��other��ξ������������Ƥ�Ҥ�������������� + �֤��� self * times - ����η����֤�. + ����η����֤��� self - other @@ -1250,73 +1253,73 @@ Methods: self << obj - obj��������������ɲä���. self���֤��Τ�C++Ū��Ϣ���Ǥ���. + obj��������������ɲä��롥self���֤��Τ�C++Ū��Ϣ���Ǥ��롥 assoc(key) - Ϣ�ۥꥹ��(2���Ǥ���������ǤȤ�������)����, ��1���Ǥ�key - ��������("=="����Ӥ���)������֤�. + Ϣ�ۥꥹ��(2���Ǥ���������ǤȤ�������)��������1���Ǥ�key + ��������("=="����Ӥ���)������֤��� clear - ������礭����0�ˤ���. + ������礭����0�ˤ��롥 delete(val) - val�Ȱ��פ������Ǥ�������. + val�Ȱ��פ������Ǥ������롥 delete_if - ���Ǥ������륤�ƥ졼��. �֥��å���ɾ�������ͤ����λ�, �б��� - �����Ǥ�����������. + ���Ǥ������륤�ƥ졼�����֥��å���ɾ�������ͤ����λ����б��� + �����Ǥ����������롥 each - ����γ����Ǥ���Ϳ���륤�ƥ졼��. + ����γ����Ǥ���Ϳ���륤�ƥ졼���� fill(val) fill(val, start[, length]) fill(val, start..end) - ����(�λ��ꤵ�줿��ʬ)�����Ǥ��ͤ�val�����ꤹ��. 2�֤�η����� - length����ά���줿��������ν���ޤǤ�Ĺ����Ȥ�. ���ꤵ�줿�� - ʬ������������ϰϤ�ۤ�����ϼ�ưŪ�˳�ĥ�����. + ����(�λ��ꤵ�줿��ʬ)�����Ǥ��ͤ�val�����ꤹ�롥2�֤�η����� + length����ά���줿��������ν���ޤǤ�Ĺ����Ȥ롥���ꤵ�줿�� + ʬ������������ϰϤ�ۤ�����ϼ�ưŪ�˳�ĥ����롥 index(val) - val���������ǽ�����ǤΥ���ǥå������֤�. �����������Ǥ�¸�� - ���ʤ�����nil���֤�. + val���������ǽ�����ǤΥ���ǥå������֤��������������Ǥ�¸�� + ���ʤ�����nil���֤��� indexes(ary) indexes(index-1, ..., index-n) - 1���ܤη����Ǥ����������������Ȥ��Ƽ�����, �������Ǥ�ǥ� - �����Ȥ������Ǥ�ޤ�������֤�. 2���ܤη����Ǥϳư������ͤ� - ��ǥå����Ȥ������Ǥ�ޤ�������֤�. + 1���ܤη����Ǥ����������������Ȥ��Ƽ����ơ��������Ǥ�ǥ� + �����Ȥ������Ǥ�ޤ�������֤���2���ܤη����Ǥϳư������ͤ� + ��ǥå����Ȥ������Ǥ�ޤ�������֤��� join([sep]) - ��������Ǥ�Ϣ�뤷��ʸ������֤�. �����Ǥ�ʸ������Ѵ�����, �� - ��sep���Ϣ�뤵���. sep����ά���줿���ˤϥ����ƥ��ѿ�`$,' - ���ͤ��Ѥ�����. + ��������Ǥ�Ϣ�뤷��ʸ������֤��������Ǥ�ʸ������Ѵ����졤�� + ��sep���Ϣ�뤵��롥sep����ά���줿���ˤϥ����ƥ��ѿ�`$,' + ���ͤ��Ѥ����롥 length size - �����Ĺ��(���ǿ�)���֤�. + �����Ĺ��(���ǿ�)���֤��� push(obj) - obj��������������ɲä���. + obj��������������ɲä��롥 pack(template) - ��������Ƥ�templateʸ����ˤ������ä�, 1�Ĥ�ʸ����˥ѥå��� - ��. �ѥå�����ʸ������֤�. �ƥ�ץ졼�ȤϷ�����ʸ����Ȥ���Ĺ - ��(��ά����1)���¤٤���ΤǤ���. Ĺ���Ȥ���`*'�����ꤵ�줿���� - �ֻĤ�Υǡ������ơפ�Ĺ����ɽ��. + ��������Ƥ�templateʸ����ˤ������äơ�1�Ĥ�ʸ����˥ѥå��� + �롥�ѥå�����ʸ������֤����ƥ�ץ졼�ȤϷ�����ʸ����Ȥ���Ĺ + ��(��ά����1)���¤٤���ΤǤ��롥Ĺ���Ȥ���`*'�����ꤵ�줿���� + �ֻĤ�Υǡ������ơפ�Ĺ����ɽ���� - ������ʸ���ϰʲ��Τ�Τ�����. + ������ʸ���ϰʲ��Τ�Τ����롥 a ASCIIʸ����(nullʸ����ͤ��) A ASCIIʸ����(���ڡ�����ͤ��) @@ -1342,41 +1345,41 @@ Methods: pop - ��������������Ǥ��������, ������֤�. + ��������������Ǥ�������ơ�������֤��� rassoc(value) - Ϣ�ۥꥹ��(2���Ǥ���������ǤȤ�������)����, ��2���Ǥ� - value��������("=="����Ӥ���)������֤�. + Ϣ�ۥꥹ��(2���Ǥ���������ǤȤ�������)��������2���Ǥ� + value��������("=="����Ӥ���)������֤��� shift - �������Ƭ�����Ǥ��������, ������֤�. + �������Ƭ�����Ǥ�������ơ�������֤��� sort - ��������Ƥ��Ȥ���. ���ƥ졼���Ȥ��ƸƤӽФ��줿���ϥ֥��� - ����ɾ�������ͤ����Ǥ��羮����ꤹ��. �礭��������, ���������� - 0, ������������. �̾�Υ�åɤȤ��ƸƤӽФ��줿���ϳ����� - ��`<=>'����Ӥ���. + ��������Ƥ��Ȥ��롥���ƥ졼���Ȥ��ƸƤӽФ��줿���ϥ֥��� + ����ɾ�������ͤ����Ǥ��羮����ꤹ�롥�礭�������������������� + 0�������������顥�̾�Υ�åɤȤ��ƸƤӽФ��줿���ϳ����� + ��`<=>'����Ӥ��롥 to_a - ��ʬ���Ȥ��֤�. �о����Τ�����Ѱդ���Ƥ����åɤǤ��ޤ��� - �ʤ�. + ��ʬ���Ȥ��֤����о����Τ�����Ѱդ���Ƥ����åɤǤ��ޤ��� + �ʤ��� unshift(obj) - obj���������Ƭ���ɲä���. + obj���������Ƭ���ɲä��롥 *** Bignum(���饹) -̵��¿��Ĺ�����Υ��饹. �黻�η�̤�����Fixnum���ϰ���Ǥ�����ˤϼ� -ưŪ�˥��饹��Fixnum���Ѵ������. ����Ū��Ruby�ץ������Ǥ�Fixnum�� -Bignum���Ѵ��ϰ��ۤΤ����˹Ԥ���Τ�, �ռ�����ɬ�פ�̵��. Float�Ȥ� -����˴ؤ��Ƥ�, Bignum��� Float������genericity���⤤�Τˤ�ؤ�餺, -Bignum������, �礭���ͤ�ɽ���Ǥ���Τ�, �Ѵ����˷�������������ǽ���� -����. +̵��¿��Ĺ�����Υ��饹���黻�η�̤�����Fixnum���ϰ���Ǥ�����ˤϼ� +ưŪ�˥��饹��Fixnum���Ѵ�����롥����Ū��Ruby�ץ������Ǥ�Fixnum�� +Bignum���Ѵ��ϰ��ۤΤ����˹Ԥ���Τǡ��ռ�����ɬ�פ�̵����Float�Ȥ� +����˴ؤ��Ƥϡ�Bignum��� Float������genericity���⤤�Τˤ�ؤ�餺�� +Bignum���������礭���ͤ�ɽ���Ǥ���Τǡ��Ѵ����˷�������������ǽ���� +���롥 SuperClass: Integer @@ -1390,33 +1393,33 @@ Methods: self % other self ** other - ���ѱ黻. ���줾����, ��, ��, ��, ��;, �Ѿ���֤�. + ���ѱ黻�����줾���¡������ѡ�������;���Ѿ���֤��� ~ self self | other self & other self ^ other - �ӥåȱ黻. ���줾��ӥå�ȿž, ������, ������, ��¾Ū�����¤� - �֤�. + �ӥåȱ黻�����줾��ӥå�ȿž�������¡������ѡ���¾Ū�����¤� + �֤��� self << bits self >> bits - ���եȱ黻. ���줾��bits�ӥåȤ��������˥ӥåȥ��եȤ�Ԥʤ�. + ���եȱ黻�����줾��bits�ӥåȤ��������˥ӥåȥ��եȤ�Ԥʤ��� divmod(other) - ���Ⱦ�;��2���Ǥ�������֤�. + ���Ⱦ�;��2���Ǥ�������֤��� *** Class(���饹) -���饹�Υ��饹. ��긷̩����������ȥ��饹���ðۥ�åɤ�Ѿ����뤿�� -��, ���줾�����饹�ȸƤФ��̾���Τʤ����饹�饹�Ȥ��ƻ���, -Class�Ϥ��Υ���饹�Υ��饹�Ǥ���(ʬ���ä�����?). ��, ���β��⤬���� -�Ǥ��ʤ��Ƥ�, Ruby��Ȥ����Ȥ˲��λپ��ʤ�. ���饹�ˤ��ðۥ�åɤ� -����Ǥ������, �����ѡ����饹��������줿�ðۥ�åɤϤ��Υ��֥��饹 -�Ǥ�ͭ���Ǥ�������Τ�н�ʬ�Ǥ���. +���饹�Υ��饹����긷̩����������ȥ��饹���ðۥ�åɤ�Ѿ����뤿�� +�ˡ����줾�����饹�ȸƤФ��̾���Τʤ����饹�饹�Ȥ��ƻ����� +Class�Ϥ��Υ���饹�Υ��饹�Ǥ���(ʬ���ä�����?)���������β��⤬���� +�Ǥ��ʤ��Ƥ⡤Ruby��Ȥ����Ȥ˲��λپ��ʤ������饹�ˤ��ðۥ�åɤ� +����Ǥ�����ȡ������ѡ����饹��������줿�ðۥ�åɤϤ��Υ��֥��饹 +�Ǥ�ͭ���Ǥ�������Τ�н�ʬ�Ǥ��롥 SuperClass: Module @@ -1424,55 +1427,55 @@ Private Methods: attr(name[, public]) - ���Υ��饹�Υ������Ф���name�ǻ��ꤵ���°�����������. - �ܤ�����Module��attr��åɤι�ȤΤ���. + ���Υ��饹�Υ������Ф���name�ǻ��ꤵ���°����������롥 + �ܤ�����Module��attr��åɤι�ȤΤ��ȡ� Methods: new(...) - ���饹�Υ�������������. ¿���ξ�礳�Υ�åɤϥ��֥� - �饹���ðۥ�åɤˤ�äƥ����С��饤�ɤ���, ���饹�ˤ�äư� - �����ۤʤ�. + ���饹�Υ������������롥¿���ξ�礳�Υ�åɤϥ��֥� + �饹���ðۥ�åɤˤ�äƥ����С��饤�ɤ��졤���饹�ˤ�äư� + �����ۤʤ롥 *** Comparable(�⥸�塼��) -��ӱ黻��������饹�Τ����Mixin. ���Υ⥸�塼��롼�ɤ��뤳 -�Ȥˤ�ä�, `<=>'�黻�Ҥ�������������¾�α黻�ҤϤ�����������Ѥ��� -�����Ǥ���. +��ӱ黻��������饹�Τ����Mixin�����Υ⥸�塼��롼�ɤ��뤳 +�Ȥˤ�äơ�`<=>'�黻�Ҥ�������������¾�α黻�ҤϤ�����������Ѥ��� +�����Ǥ��롥 Methods: self == other - self��other���������������֤�. + self��other���������������֤��� self > other - self��other����礭���������֤�. + self��other����礭���������֤��� self >= other - self��other����礭�����������������֤�. + self��other����礭�����������������֤��� self < other - self��other��꾮�����������֤�. + self��other��꾮�����������֤��� self <= other - self��other��꾮�������������������֤�. + self��other��꾮�������������������֤��� between(min, max) - self��min��max���ϰ���ˤ���������֤�. + self��min��max���ϰ���ˤ���������֤��� *** DBM(���饹) -NDBM�ե�������������륯�饹. ����, �ǡ����Ȥ��ʸ����Ǥʤ���Ф� -��ʤ��Ȥ������¤�, �ǡ������ե��������¸�����Ȥ�����������Ƥ� -Dict���饹������Ʊ�ͤ˰������Ȥ��Ǥ���. NDBM�������Ƥ��ʤ������ƥ�Ǥ� -���Υ��饹���������ʤ�. +NDBM�ե�������������륯�饹���������ǡ����Ȥ��ʸ����Ǥʤ���Ф� +��ʤ��Ȥ������¤ȡ��ǡ������ե��������¸�����Ȥ�����������Ƥ� +Dict���饹������Ʊ�ͤ˰������Ȥ��Ǥ��롥NDBM�������Ƥ��ʤ������ƥ�Ǥ� +���Υ��饹���������ʤ��� SuperClass: Object @@ -1482,92 +1485,92 @@ Methods: self [key] - key���Ȥ����ͤ��֤�. + key���Ȥ����ͤ��֤��� self [key]= value - key���Ȥ���, value���Ǽ����. value�Ȥ���nil����ꤹ���, - key���Ф�����ܤκ���Ȥʤ�. + key���Ȥ��ơ�value���Ǽ���롥value�Ȥ���nil����ꤹ��ȡ� + key���Ф�����ܤκ���Ȥʤ롥 clear - DBM�ե��������Ȥ���ˤ���. + DBM�ե��������Ȥ���ˤ��롥 close - DBM�ե��������������. �ʸ�������㳰��ȯ��������. + DBM�ե�������������롥�ʸ�������㳰��ȯ�������롥 delete(key) - key���Ȥ����Ȥ�������. + key���Ȥ����Ȥ������롥 delete_if - ���Ǥ������륤�ƥ졼��. [key, value]�Ȥ��������Ϳ����, �֥��� - ����ɾ�������ͤ����λ�, ����������ܤ�������. + ���Ǥ������륤�ƥ졼����[key, value]�Ȥ��������Ϳ���ơ��֥��� + ����ɾ�������ͤ����λ�������������ܤ������롥 each each_pair - [key, value]�ʤ������Ϳ���륤�ƥ졼��. + [key, value]�ʤ������Ϳ���륤�ƥ졼���� each_value - ���Ƥ�value���Ф��Ʒ����֤����ƥ졼��. + ���Ƥ�value���Ф��Ʒ����֤����ƥ졼���� each_key - ���Ƥ�key���Ф��Ʒ����֤����ƥ졼��. + ���Ƥ�key���Ф��Ʒ����֤����ƥ졼���� has_key(key) includes(key) - key���ǡ����١������¸�ߤ����, �����֤� + key���ǡ����١������¸�ߤ�����������֤� has_value(value) - value���ͤȤ����Ȥ��ǡ����١������¸�ߤ����, ���� + value���ͤȤ����Ȥ��ǡ����١������¸�ߤ���������� �֤� indexes(ary) indexes(key-1, ..., key-n) - 1���ܤη����Ǥ�ʸ��������������Ȥ��Ƽ�����, �������Ǥ� - �Ȥ������Ǥ�ޤ�������֤�. 2���ܤη����Ǥϳư������ͤ��� + 1���ܤη����Ǥ�ʸ��������������Ȥ��Ƽ����ơ��������Ǥ� + �Ȥ������Ǥ�ޤ�������֤���2���ܤη����Ǥϳư������ͤ��� �������Ǥ�ޤ�������֤�. keys - �ǡ����١������¸�ߤ��륭�����Ƥ�ޤ�������֤�. + �ǡ����١������¸�ߤ��륭�����Ƥ�ޤ�������֤��� length size - �ǡ����١���������Ǥο����֤�. (����:���ߤμ¸��Ǥ����ǿ���� - ���뤿��˥ǡ����١�����������������Τ�, �빽�����Ȥ��⤤. �� + �ǡ����١���������Ǥο����֤���(����:���ߤμ¸��Ǥ����ǿ���� + ���뤿��˥ǡ����١�����������������Τǡ��빽�����Ȥ��⤤���� ��Ĥ��ƻȤ�����.) to_a - �ǡ����١������key-value�ڥ������ǤȤ���������֤�. + �ǡ����١������key-value�ڥ������ǤȤ���������֤��� values - �ǡ����١������¸�ߤ��������Ƥ�ޤ�������֤�. + �ǡ����١������¸�ߤ��������Ƥ�ޤ�������֤��� Single Methods: open(dbname[, mode]) dbname�ǻ��ꤷ���ǡ����١�����⡼�ɤ�mode�����ꤷ�ƥ����ץ� - ��. mode�ξ�ά�ͤ�0666�Ǥ���. mode�Ȥ���nil����ꤹ��ȥǡ��� - �١���������¸�ߤ��ʤ����ˤϿ����˥����ץ�, nil���֤�. + �롥mode�ξ�ά�ͤ�0666�Ǥ��롥mode�Ȥ���nil����ꤹ��ȥǡ��� + �١���������¸�ߤ��ʤ����ˤϿ����˥����ץ���nil���֤��� *** Dict(���饹) -���뤤��Ϣ������. Ǥ�դΥ��֥������Ȥ�ź���ȤǤ�������Υ��饹�Ǥ� -��. Hash�Ȥ���̾���Ǥ⥢�������Ǥ���. Ϣ�����֥������Ȥ������ϰ��� -Ū�ˤ�Ϣ������``{a=>b,..}'' �ǹԤʤ���. +���뤤��Ϣ������Ǥ�դΥ��֥������Ȥ�ź���ȤǤ�������Υ��饹�Ǥ� +�롥Hash�Ȥ���̾���Ǥ⥢�������Ǥ��롥Ϣ�����֥������Ȥ������ϰ��� +Ū�ˤ�Ϣ������``{a=>b,..}'' �ǹԤʤ��롥 SuperClass: Object @@ -1577,83 +1580,83 @@ Methods: self [key] - key���Ȥ����ͤ��֤�. + key���Ȥ����ͤ��֤��� self [key]= value - key���Ȥ���, value���Ǽ����. value�Ȥ���nil����ꤹ��Ȥ� - ��key���Ф�����ܤκ���Ȥʤ�. �Ĥޤ�, Dict���ͤȤ���nil����� - ���ȤϤǤ��ʤ�. + key���Ȥ��ơ�value���Ǽ���롥value�Ȥ���nil����ꤹ��Ȥ� + ��key���Ф�����ܤκ���Ȥʤ롥�ĤޤꡤDict���ͤȤ���nil����� + ���ȤϤǤ��ʤ��� clear - Ϣ���������ˤ���. + Ϣ���������ˤ��롥 delete(key) - key���Ȥ����Ȥ�������. + key���Ȥ����Ȥ������롥 delete_if - ���Ǥ������륤�ƥ졼��. [key, value]�Ȥ��������Ϳ����, �֥��� - ����ɾ�������ͤ����λ�, ����������ܤ�������. + ���Ǥ������륤�ƥ졼����[key, value]�Ȥ��������Ϳ���ơ��֥��� + ����ɾ�������ͤ����λ�������������ܤ������롥 each each_value - ���Ƥ�value���Ф��Ʒ����֤����ƥ졼��. + ���Ƥ�value���Ф��Ʒ����֤����ƥ졼���� each_key - ���Ƥ�key���Ф��Ʒ����֤����ƥ졼��. + ���Ƥ�key���Ф��Ʒ����֤����ƥ졼���� each_pair - [key, value]�ʤ������Ϳ���륤�ƥ졼��. + [key, value]�ʤ������Ϳ���륤�ƥ졼���� has_key(key) includes(key) - key���������¸�ߤ����, �����֤� + key���������¸�ߤ�����������֤� has_value(value) - value���ͤȤ����Ȥ��������¸�ߤ����, �����֤� + value���ͤȤ����Ȥ��������¸�ߤ�����������֤� indexes(ary) indexes(key-1, ..., key-n) - 1���ܤη����Ǥ����������Ȥ��Ƽ�����, �������Ǥ��Ȥ����� - �Ǥ�ޤ�������֤�. 2���ܤη����Ǥϳư������ͤ��Ȥ������� - ��ޤ�������֤�. + 1���ܤη����Ǥ����������Ȥ��Ƽ����ơ��������Ǥ��Ȥ����� + �Ǥ�ޤ�������֤���2���ܤη����Ǥϳư������ͤ��Ȥ������� + ��ޤ�������֤��� keys - �������¸�ߤ��륭�����Ƥ�ޤ�������֤�. + �������¸�ߤ��륭�����Ƥ�ޤ�������֤��� length size - ����������Ǥο����֤�. + ����������Ǥο����֤��� to_a - �������key-value�ڥ������ǤȤ���������֤�. + �������key-value�ڥ������ǤȤ���������֤��� values - �������¸�ߤ��������Ƥ�ޤ�������֤�. + �������¸�ߤ��������Ƥ�ޤ�������֤��� Single Methods: new - ������(����)���֥������Ȥ��֤�. + ������(����)���֥������Ȥ��֤��� *** Directory(���饹) -�ǥ��쥯�ȥ�������Ǥ����֤��ǥ��쥯�ȥꥹ�ȥ�����Τ���Υ��饹. -Dir�Ȥ���̾���Ǥ⥢�������Ǥ���. +�ǥ��쥯�ȥ�������Ǥ����֤��ǥ��쥯�ȥꥹ�ȥ�����Τ���Υ��饹�� +Dir�Ȥ���̾���Ǥ⥢�������Ǥ��롥 SuperClass: Object @@ -1663,61 +1666,61 @@ Methods: close - �ǥ��쥯�ȥꥹ�ȥ�����������. �ʸ�������㳰��ȯ���� - ����. + �ǥ��쥯�ȥꥹ�ȥ����������롥�ʸ�������㳰��ȯ���� + ���롥 each - �ǥ��쥯�ȥ���γ����Ǥ���Ϳ���륤�ƥ졼��. + �ǥ��쥯�ȥ���γ����Ǥ���Ϳ���륤�ƥ졼���� getwd pwd - �����ȥǥ��쥯�ȥ���֤�. + �����ȥǥ��쥯�ȥ���֤��� rewind - �ǥ��쥯�ȥꥹ�ȥ�����Ƭ�˥ꥻ�åȤ���. + �ǥ��쥯�ȥꥹ�ȥ�����Ƭ�˥ꥻ�åȤ��롥 seek(pos) - �ǥ��쥯�ȥꥹ�ȥ��ΰ��֤�pos�����ꤹ��. + �ǥ��쥯�ȥꥹ�ȥ��ΰ��֤�pos�����ꤹ�롥 tell - �ǥ��쥯�ȥꥹ�ȥ��θ��ߤΰ��֤��֤�. + �ǥ��쥯�ȥꥹ�ȥ��θ��ߤΰ��֤��֤��� Single Methods: chdir(path) - �����ȥǥ��쥯�ȥ��path���ѹ�����. + �����ȥǥ��쥯�ȥ��path���ѹ����롥 chroot(path) - �ץ������Υ롼�ȥǥ��쥯�ȥ���ѹ�����, Ʊ̾�Υ����ƥॳ����� - Ʊ��Ư����. �������ϼ¸�uid�������ѥ桼���Ǥ���������� - ���¤���Ƥ���. �롼�ȥǥ��쥯�ȥ���᤹(�롼�ȥǥ��쥯�� - ���������ѹ�����)��ˡ������Ƥ��ʤ�. + �ץ������Υ롼�ȥǥ��쥯�ȥ���ѹ����롤Ʊ̾�Υ����ƥॳ����� + Ʊ��Ư���롥�������ϼ¸�uid�������ѥ桼���Ǥ���������� + ���¤���Ƥ��롥�롼�ȥǥ��쥯�ȥ���᤹(�롼�ȥǥ��쥯�� + ���������ѹ�����)��ˡ������Ƥ��ʤ��� mkdir(path[, mode]) - mode�ǻ��ꤵ�줿�⡼�ɤ���ĥǥ��쥯�ȥ�path���������. �⡼�� - ��umask�ˤ�äƽ��������. mode�Υǥե�����ͤ�0777. + mode�ǻ��ꤵ�줿�⡼�ɤ���ĥǥ��쥯�ȥ�path��������롥�⡼�� + ��umask�ˤ�äƽ�������롥mode�Υǥե�����ͤ�0777�� open(path) - path���Ф���ǥ��쥯�ȥꥹ�ȥ����ץ�. + path���Ф���ǥ��쥯�ȥꥹ�ȥ����ץ롥 rmdir(path) - path�ǻ��ꤵ�줿�ǥ��쥯�ȥ��������. �ǥ��쥯�ȥ�϶��Ǥ��� - ɬ�פ�����. + path�ǻ��ꤵ�줿�ǥ��쥯�ȥ�������롥�ǥ��쥯�ȥ�϶��Ǥ��� + ɬ�פ����롥 *** Enumerable(�⥸�塼��) -���Ǥ��Ф��뷫���֤���Ԥʤ����饹�Τ����Mixin. ���Υ⥸�塼��� -���롼�ɤ��뤿��ˤ�, ��å�`each'���������ɬ�פ�����. +���Ǥ��Ф��뷫���֤���Ԥʤ����饹�Τ����Mixin�����Υ⥸�塼��� +���롼�ɤ��뤿��ˤϡ���å�`each'���������ɬ�פ����롥 Methods: @@ -1727,65 +1730,65 @@ Methods: find - ���Ǥ��Ф��ƥ֥��å���ɾ�������ͤ����ˤʤä��ǽ�����Ǥ��֤�. + ���Ǥ��Ф��ƥ֥��å���ɾ�������ͤ����ˤʤä��ǽ�����Ǥ��֤��� find_all �����Ǥ��Ф��ƥ֥��å���ɾ�������ͤ����Ǥ��ä����Ǥ����ƴޤ��� - ����֤�. + ����֤��� grep(pattern) - ������ =~ pattern�פ���Ω�������Ƥ����Ǥ�ޤ�������֤�. ���� + ������ =~ pattern�פ���Ω�������Ƥ����Ǥ�ޤ�������֤������� �졼���Ȥ����Ѥ���줿���Ͼ嵭�ξ�����Ω�������Ǥ��Ф��ƥ֥��� - ����¹Ԥ���. + ����¹Ԥ��롥 includes(val) - val��`=='�δط��ˤ������Ǥ���Ļ�, �����֤�. + val��`=='�δط��ˤ������Ǥ���Ļ��������֤��� index(val) - val��`=='�δط��ˤ��륪�֥������Ȥ������ܤ˸��줿�����֤�. �� - �ֺǽ�����Ǥ�0�ˤʤ�. ���Ǥ�¸�ߤ��ʤ����ˤ�nil���֤�. ����� - �ʤ����饹���Ф��ƤϤ��ޤ��̣���ʤ�. + val��`=='�δط��ˤ��륪�֥������Ȥ������ܤ˸��줿�����֤����� + �ֺǽ�����Ǥ�0�ˤʤ롥���Ǥ�¸�ߤ��ʤ����ˤ�nil���֤�������� + �ʤ����饹���Ф��ƤϤ��ޤ��̣���ʤ��� min - �Ǿ������Ǥ��֤�. ���Ƥ����Ǥ����ߤ���`<=>'��åɤ���ӤǤ� - �뤳�Ȥ��ꤷ�Ƥ���. + �Ǿ������Ǥ��֤������Ƥ����Ǥ����ߤ���`<=>'��åɤ���ӤǤ� + �뤳�Ȥ��ꤷ�Ƥ��롥 max - ��������Ǥ��֤�. �����Ǥ�`<=>'��åɤ���ӤǤ��뤳�Ȥ��� - ���Ƥ���. + ��������Ǥ��֤��������Ǥ�`<=>'��åɤ���ӤǤ��뤳�Ȥ��� + ���Ƥ��롥 reverse - ���Ƥ����Ǥ�ս���¤٤�������֤�. + ���Ƥ����Ǥ�ս���¤٤�������֤��� sort - ���Ƥ����Ǥ��Ȥ���������֤�. + ���Ƥ����Ǥ��Ȥ���������֤��� *** Etc(�⥸�塼��) -/etc�ǥ��쥯�ȥ�ʲ��ξ�������뤿��Υ⥸�塼��. ���饹�˥��롼�� -���ƻȤ����Ȥ�Ǥ���. +/etc�ǥ��쥯�ȥ�ʲ��ξ�������뤿��Υ⥸�塼�롥���饹�˥��롼�� +���ƻȤ����Ȥ�Ǥ��롥 Methods: Single Methods: getlogin - ��ʬ��login̾���֤�. ���줬���Ԥ�������getpwuid()���Ѥ���� - �ɤ�. + ��ʬ��login̾���֤������줬���Ԥ�������getpwuid()���Ѥ���� + �ɤ��� getpwnam(name) /etc/passwd�ե�����(���뤤��DBM�ե������NIS�ǡ����١���)�� - ����, name��̾�������passwd����ȥ���֤�. ����ͤ�passwd��¤ - �Τǰʲ��Υ��Ф����. + ������name��̾�������passwd����ȥ���֤�������ͤ�passwd��¤ + �Τǰʲ��Υ��Ф���ġ� struct passwd name # �桼��̾(ʸ����) @@ -1795,7 +1798,7 @@ Single Methods: gecos # gecos�ե������(ʸ����) dir # �ۡ���ǥ��쥯�ȥ�(ʸ����) shell # ����������(ʸ����) - # �ʹߤΥ��Фϥ����ƥ�ˤ�äƤ�����ʤ�. + # �ʹߤΥ��Фϥ����ƥ�ˤ�äƤ�����ʤ��� change # �ѥ�����ѹ�����(����) quota # ��������(����) age # ������(����) @@ -1804,19 +1807,19 @@ Single Methods: expire # ���������ͭ������(����) end - �ܺ٤�getpwnam(3)�ȤΤ���. + �ܺ٤�getpwnam(3)�ȤΤ��ȡ� getpwuid([uid]) - uid��桼��ID�Ȥ���passwd����ȥ���֤�. ����ͤ�getpwnam()�� - Ʊ�ͤǤ���. �������ά�������ˤ�getuid()���ͤ��Ѥ���. �ܺ٤� - getpwuid(3)�ȤΤ���. + uid��桼��ID�Ȥ���passwd����ȥ���֤�������ͤ�getpwnam()�� + Ʊ�ͤǤ��롥�������ά�������ˤ�getuid()���ͤ��Ѥ��롥�ܺ٤� + getpwuid(3)�ȤΤ��ȡ� getgrgid(gid) - /etc/group�ե�����(���뤤�ϡ�getpwnam����)����, gid�롼 - ��ID�Ȥ��륰�롼�ץ���ȥ���֤�. ����ͤ�group��¤�Τǰʲ��� - ���Ф����. + /etc/group�ե�����(���뤤�ϡ�getpwnam����)������gid�롼 + ��ID�Ȥ��륰�롼�ץ���ȥ���֤�������ͤ�group��¤�Τǰʲ��� + ���Ф���ġ� struct group name # ���롼��̾(ʸ����) @@ -1825,26 +1828,26 @@ Single Methods: mem # ���롼�ץ���̾������ end - �ܺ٤�getgrgid(3)�ȤΤ���. + �ܺ٤�getgrgid(3)�ȤΤ��ȡ� getgrnam(name) - name�Ȥ���̾���Υ��롼�ץ���ȥ���֤�. ����ͤ�getgrgid()��Ʊ - �ͤǤ���. �ܺ٤�getgrnam(3)��. + name�Ȥ���̾���Υ��롼�ץ���ȥ���֤�������ͤ�getgrgid()��Ʊ + �ͤǤ��롥�ܺ٤�getgrnam(3)�ȡ� group - ���ƤΥ��롼�ץ���ȥ���˥����������뤿��Υ��ƥ졼��. + ���ƤΥ��롼�ץ���ȥ���˥����������뤿��Υ��ƥ졼���� passwd - ���Ƥ�passwd����ȥ���˥����������뤿��Υ��ƥ졼��. + ���Ƥ�passwd����ȥ���˥����������뤿��Υ��ƥ졼���� *** File(���饹) -�ե����륢�������Τ���Υ��饹. ��å�open()�����������. �ޤ�, ���� +�ե����륢�������Τ���Υ��饹����å�open()����������롥�ޤ������� ���饹���ðۥ�åɤȤ���test�Υե�����ƥ��ȱ黻�������Υ�åɤ��� -������Ƥ���(FileTest�⥸�塼��Υ�åɷ�). +������Ƥ���(FileTest�⥸�塼��Υ�åɷ�)�� SuperClass: IO @@ -1852,53 +1855,53 @@ Methods: atime - �ե�����κǽ���������������֤�. + �ե�����κǽ���������������֤��� ctime - �ե�����κǽ����ơ������ѹ�������֤�. + �ե�����κǽ����ơ������ѹ�������֤��� chmod(mode) - �ե�����Υѡ��ߥå������ѹ�����(cf chmod(2)). + �ե�����Υѡ��ߥå������ѹ�����(cf chmod(2))�� chown(owner, group) - �ե�����ν�ͭ�Ԥȥ��롼�פ��ѹ�����(cf chown(2)). nil��-1�� + �ե�����ν�ͭ�Ԥȥ��롼�פ��ѹ�����(cf chown(2))��nil��-1�� ���ꤹ�뤳�Ȥˤ�äƽ�ͭ�Ԥ䥰�롼�פߤΤޤ��Ѥ��ʤ��Ǥ��� - ���Ȥ��Ǥ���. + ���Ȥ��Ǥ��롥 eof - �ե�����ν�ü����ã�������˿����֤�. + �ե�����ν�ü����ã�������˿����֤��� lstat - �ե�����˴ؤ���Stat��¤�Τ��֤�. lstat�ϥե����뤬����ܥ�� - ����Ǥ���Х���Τ�Τ˴ؤ���Stat��¤�Τ��֤�. ��¤�� - �����ƤˤĤ��Ƥ�stat�ȤΤ���. + �ե�����˴ؤ���Stat��¤�Τ��֤���lstat�ϥե����뤬����ܥ�� + ����Ǥ���Х���Τ�Τ˴ؤ���Stat��¤�Τ��֤�����¤�� + �����ƤˤĤ��Ƥ�stat�ȤΤ��ȡ� mtime - �ե�����κǽ�����������֤�. + �ե�����κǽ�����������֤��� rewind - �ե�����Υե�����ݥ��ΰ��֤���Ƭ�˰�ư����. + �ե�����Υե�����ݥ��ΰ��֤���Ƭ�˰�ư���롥 path - �ե�����Υѥ�̾���֤�. + �ե�����Υѥ�̾���֤��� seek(offset, ptrname) - �ե�����Υե�����ݥ��ΰ��֤�offset�˰�ư����. ptrname�� - 0, 1, 2�Τ����줫�Ǥ��ä�, ���줾��ե��������Ƭ, ���߰���, - �ե�����ν�ü�Τ����Τ����줫��������Ф�. + �ե�����Υե�����ݥ��ΰ��֤�offset�˰�ư���롥ptrname�� + 0��1��2�Τ����줫�Ǥ��äơ����줾��ե��������Ƭ�����߰��֡� + �ե�����ν�ü�Τ����Τ����줫��������Ф��� stat - �ե�����˴ؤ���Stat��¤�Τ��֤�(Struct ��). + �ե�����˴ؤ���Stat��¤�Τ��֤�(Struct ��)�� struct stat dev # �ե������¸�ߤ���ǥХ��� @@ -1916,204 +1919,204 @@ Methods: ctime # �ǽ������ѹ����� end - �ܺ٤�������fstat(2)�ȤΤ���. �����ƥ����������Ƥ��� - stat��¤�Τ˳���������Ф��ʤ�����0�����ꤵ��Ƥ���. + �ܺ٤�������fstat(2)�ȤΤ��ȡ������ƥ����������Ƥ��� + stat��¤�Τ˳���������Ф��ʤ�����0�����ꤵ��Ƥ��롥 tell - �ե�����θ��ߤΥե�����ݥ��ΰ��֤��֤�. + �ե�����θ��ߤΥե�����ݥ��ΰ��֤��֤��� truncate(length) - �ե�������ڤ�ΤƤƺ���length�Х��Ȥˤ���. �ե������write�⡼ - �ɤǥ����ץ�Ƥ��ʤ���Фʤ�ʤ�. + �ե�������ڤ�ΤƤƺ���length�Х��Ȥˤ��롥�ե������write�⡼ + �ɤǥ����ץ�Ƥ��ʤ���Фʤ�ʤ��� Single Methods: atime(filename) - filename�κǽ���������������֤�. + filename�κǽ���������������֤��� ctime(filename) - filename�κǽ����ơ������ѹ�������֤�. + filename�κǽ����ơ������ѹ�������֤��� chmod(mode, path, file...) - �ե�����Υѡ��ߥå������ѹ�����(cf chmod(2)). �ѹ������ե� - ��������֤�. file�ˤϥ磻��ɥ����ɤ����. + �ե�����Υѡ��ߥå������ѹ�����(cf chmod(2))���ѹ������ե� + ��������֤���file�ˤϥ磻��ɥ����ɤ������ chown(owner, group, file...) - �ե�����ν�ͭ�Ԥȥ��롼�פ��ѹ�����(cf chown(2)). nil��-1��� + �ե�����ν�ͭ�Ԥȥ��롼�פ��ѹ�����(cf chown(2))��nil��-1��� �ꤹ�뤳�Ȥˤ�äƽ�ͭ�Ԥ䥰�롼�פߤΤޤ��Ѥ��ʤ��Ǥ����� - �Ȥ��Ǥ���. �ѹ������ե���������֤�. file�ˤϥ磻��ɥ����ɤ� - ����. + �Ȥ��Ǥ��롥�ѹ������ե���������֤���file�ˤϥ磻��ɥ����ɤ� + ������ link(old, new) - old�ؤΥϡ��ɥ��new����������. link(2)��Ʊ�����¤�����. + old�ؤΥϡ��ɥ��new���������롥link(2)��Ʊ�����¤����롥 mtime(filename) - filename�κǽ�����������֤�. + filename�κǽ�����������֤��� readlink(path) - ����ܥ�å����path�����Ƥ�ʸ����Ȥ����֤�. + ����ܥ�å����path�����Ƥ�ʸ����Ȥ����֤��� rename(from, to) - �ե�����̾from��to���ѹ�����. rename(2)����. ����to�Ȥ���̾�� - �Υե����뤬¸�ߤ�����ˤϤޤ����Υե����뤬��������. + �ե�����̾from��to���ѹ����롥rename(2)���ȡ�����to�Ȥ���̾�� + �Υե����뤬¸�ߤ�����ˤϤޤ����Υե����뤬�������롥 stat(filename) - filename�Υե������Stat��¤�Τ��֤�. + filename�Υե������Stat��¤�Τ��֤��� symlink(old, new) - old�ؤΥ���ܥ�å����new����������. + old�ؤΥ���ܥ�å����new���������롥 truncate(path, length) - path�ǻ��ꤵ�줿�ե�������ڤ�ΤƤƺ���length�Х��Ȥˤ���. + path�ǻ��ꤵ�줿�ե�������ڤ�ΤƤƺ���length�Х��Ȥˤ��롥 type(filename) - filename�Υե�����Υ����פ�ɽ��ʸ������֤�. ʸ�����"file", - "directory", "characterSpecial", "blockSpecial", "fifo", - "link", "socket"�Τ����Τ����줫��ĤǤ���. + filename�Υե�����Υ����פ�ɽ��ʸ������֤���ʸ�����"file"�� + "directory"��"characterSpecial"��"blockSpecial"��"fifo"�� + "link"��"socket"�Τ����Τ����줫��ĤǤ��롥 unlink(file...) - �ե������������. �ǥ��쥯�ȥ�κ���ˤ�Dir.rmdir��Ȥ�����. - file�ˤϥ磻��ɥ����ɤ����. + �ե�����������롥�ǥ��쥯�ȥ�κ���ˤ�Dir.rmdir��Ȥ����ȡ� + file�ˤϥ磻��ɥ����ɤ������ utime(atime, mtime, file...) - �ե�����Υ������������atime��, ���������mtime�����ꤹ��. - atime, mtime�Ͽ��ޤ���Time���饹�Υ����Ǥʤ���Фʤ�� - ��. file�ˤϥ磻��ɥ����ɤ����. + �ե�����Υ������������atime�ˡ����������mtime�����ꤹ�롥 + atime��mtime�Ͽ��ޤ���Time���饹�Υ����Ǥʤ���Фʤ�� + ����file�ˤϥ磻��ɥ����ɤ������ - ����ʳ���FileTest�⥸�塼��Υ�åɤ��ðۥ�åɤȤ��ƻ���. + ����ʳ���FileTest�⥸�塼��Υ�åɤ��ðۥ�åɤȤ��ƻ��ġ� *** FileTest(�⥸�塼��) -�ե�����ƥ����ѥ�åɤ�⥸�塼��. ���롼�ɤ����Ѥ��뤳�� -��Ǥ���. +�ե�����ƥ����ѥ�åɤ�⥸�塼�롥���롼�ɤ����Ѥ��뤳�� +��Ǥ��롥 Methods: Single Methods: b(filename) - filename�Υե����뤬�֥��å����ڥ����ե�����Ǥ����, ������ - ��. + filename�Υե����뤬�֥��å����ڥ����ե�����Ǥ������������ + ���� c(filename) - filename�Υե����뤬����饯�����ڥ����ե�����Ǥ����, ���� - �֤�. + filename�Υե����뤬����饯�����ڥ����ե�����Ǥ���������� + �֤��� executable(filename) x(filename) - filename�Υե����뤬�¹Բ�ǽ�λ�, �����֤�. + filename�Υե����뤬�¹Բ�ǽ�λ��������֤��� exists(filename) e(filename) a(filename) - filename�Υե����뤬¸�ߤ����, �����֤�. + filename�Υե����뤬¸�ߤ�����������֤��� G(filename) - filename�Υե������gid���¸����롼�פ�gid��Ʊ����, �����֤�. + filename�Υե������gid���¸����롼�פ�gid��Ʊ�����������֤��� isdirectory(filename) d(filename) - filename���ǥ��쥯�ȥ�λ�, �����֤�. + filename���ǥ��쥯�ȥ�λ��������֤��� isfile(filename) f(filename) - filename�Υե����뤬�̾�ե�����λ�, �����֤�. + filename�Υե����뤬�̾�ե�����λ��������֤��� islink(filename) l(filename) - filename�Υե����뤬����ܥ�å���Ǥ����, �����֤�. + filename�Υե����뤬����ܥ�å���Ǥ�����������֤��� ispipe(filename) p(filename) - filename�Υե����뤬̾���Ĥ��ѥ���(FIFO)�Ǥ����, �����֤�. + filename�Υե����뤬̾���Ĥ��ѥ���(FIFO)�Ǥ�����������֤��� issocket(filename) S(filename) - filename�Υե����뤬�����åȤǤ����, �����֤�. + filename�Υե����뤬�����åȤǤ�����������֤��� owned(filename) O(filename) - filename�Υե������¸��桼������ͭ���Ƥ����, �����֤�. + filename�Υե������¸��桼������ͭ���Ƥ�����������֤��� readable(filename) r(filename) - filename�Υե�������ɤߤȤ��ǽ�λ�, �����֤�. + filename�Υե�������ɤߤȤ��ǽ�λ��������֤��� R(filename) - filename�Υե�������uid/gid���ɤߤȤ��ǽ�λ�, �����֤�. + filename�Υե�������uid/gid���ɤߤȤ��ǽ�λ��������֤��� setuid(filename) u(filename) - filename�Υե������setuid�ӥåȤ����åȤ���Ƥ����, �����֤�. + filename�Υե������setuid�ӥåȤ����åȤ���Ƥ�����������֤��� setuid(filename) g(filename) - filename�Υե������setuid�ӥåȤ����åȤ���Ƥ����, �����֤�. + filename�Υե������setuid�ӥåȤ����åȤ���Ƥ�����������֤��� size(filename) s(filename) - filename�Υե����뤬¸�ߤ����, �ե�������礭�����֤�. ¸�ߤ� - �ʤ�����nil���֤�. + filename�Υե����뤬¸�ߤ�������ե�������礭�����֤���¸�ߤ� + �ʤ�����nil���֤��� sticky(filename) g(filename) - filename�Υե������sticky�ӥåȤ����åȤ���Ƥ����, �����֤�. + filename�Υե������sticky�ӥåȤ����åȤ���Ƥ�����������֤��� writable(filename) w(filename) - filename�Υե����뤬��uid/gid�ǽ��߲�ǽ�λ�, �����֤�. + filename�Υե����뤬��uid/gid�ǽ��߲�ǽ�λ��������֤��� W(filename) - filename�Υե����뤬���߲�ǽ�λ�, �����֤�. + filename�Υե����뤬���߲�ǽ�λ��������֤��� z(filename) - filename�Υե����뤬¸�ߤ�, �礭����0�Ǥ����, �����֤�. + filename�Υե����뤬¸�ߤ����礭����0�Ǥ�����������֤��� *** Fixnum(���饹) -31bit�����Υ��饹. builtin class�Ǥ���. ���Υ��饹��pointer���¨�ͤ� +31bit�����Υ��饹��builtin class�Ǥ��롥���Υ��饹��pointer���¨�ͤ� ���뤿��call by value�ǸƤӽФ����������ħŪ�Ǥ���(¾�Υ��饹��call -by reference). �黻�η�̤�31bit��ۤ�����ˤϼ�ưŪ��Bignum(̵��¿ -��Ĺ����)�˳�ĥ�����. +by reference)���黻�η�̤�31bit��ۤ�����ˤϼ�ưŪ��Bignum(̵��¿ +��Ĺ����)�˳�ĥ����롥 -���ƥ졼��upto(), downto(), step()�Ϸ����֤��Τ�����Ѥ����, ���̤� -Range���饹���Ѥ������®�Ǥ���. +���ƥ졼��upto()��downto()��step()�Ϸ����֤��Τ�����Ѥ���졤���̤� +Range���饹���Ѥ������®�Ǥ��롥 SuperClass: Integer @@ -2126,53 +2129,53 @@ Methods: self % other self ** other - ���ѱ黻. ���줾����, ��, ��, ��, ��;, �Ѿ���֤�. + ���ѱ黻�����줾���¡������ѡ�������;���Ѿ���֤��� ~ self self | other self & other self ^ other - �ӥåȱ黻. ���줾��ӥå�ȿž, ������, ������, ��¾Ū�����¤� - �֤�. + �ӥåȱ黻�����줾��ӥå�ȿž�������¡������ѡ���¾Ū�����¤� + �֤��� self << bits self >> bits - ���եȱ黻. ���줾��bits�ӥåȤ��������˥ӥåȥ��եȤ�Ԥʤ�. + ���եȱ黻�����줾��bits�ӥåȤ��������˥ӥåȥ��եȤ�Ԥʤ��� self .. max - �ϰϻ���. self ���� max�ޤǤ��ϰϥ��֥������Ȥ��֤�. + �ϰϻ��ꡥself ���� max�ޤǤ��ϰϥ��֥������Ȥ��֤��� downto(min) - ���ƥ졼��. self����min�ޤDz������˷����֤�. + ���ƥ졼����self����min�ޤDz������˷����֤��� id2name - �����ͤ�ID���Ȥߤʤ���, ��������ʸ������֤�. ��������ʸ���� - ¸�ߤ��ʤ�����nil���֤�. + �����ͤ�ID���Ȥߤʤ��ơ���������ʸ������֤�����������ʸ���� + ¸�ߤ��ʤ�����nil���֤��� step(max, step) - ���ƥ졼��. self����max�ޤ�step�����Ѳ����ʤ���, �����֤�. + ���ƥ졼����self����max�ޤ�step�����Ѳ����ʤ��顤�����֤��� to_f - self��Float���Ѵ�������Τ��֤�. + self��Float���Ѵ�������Τ��֤��� to_i - self�Τޤ��֤�. + self�Τޤ��֤��� upto(max) - ���ƥ졼��. self����max�ޤǷ����֤�. + ���ƥ졼����self����max�ޤǷ����֤��� *** Float(���饹) - ��ư���������Υ��饹. + ��ư���������Υ��饹�� SuperClass: Numeric @@ -2185,63 +2188,63 @@ Methods: self % other self ** other - ���ѱ黻. ���줾����, ��, ��, ��, ��;, �Ѿ���֤�. + ���ѱ黻�����줾���¡������ѡ�������;���Ѿ���֤��� self == other self > other - ��ӱ黻. + ��ӱ黻�� coerce(num) - num��float���Ѵ�����. ��������������Float������Ǥ���¾�ο��� - Fixnum��Bignum�����Ǥ���. + num��float���Ѵ����롥��������������Float������Ǥ���¾�ο��� + Fixnum��Bignum�����Ǥ��롥 to_f - self�Τޤ��֤�. + self�Τޤ��֤��� to_i - self���������Ѵ�������̤��֤�. + self���������Ѵ�������̤��֤��� Single Methods: new(float) - float��Ʊ���ͤ���Ŀ�����Float���֥������Ȥ��֤�. + float��Ʊ���ͤ���Ŀ�����Float���֥������Ȥ��֤��� *** GC(�⥸�塼��) -Ruby�Ȥ߹��ߤ�garbage collector�������Ԥʤ�����Υ⥸�塼��. ���Υ� -���塼��Υ�åɤ���Ѥ��뤳�Ȥˤ�ä�, ���Ū��GC��ߤ��, GC�ε� -���륿���ߥ����椷����Ǥ���. +Ruby�Ȥ߹��ߤ�garbage collector�������Ԥʤ�����Υ⥸�塼�롥���Υ� +���塼��Υ�åɤ���Ѥ��뤳�Ȥˤ�äơ����Ū��GC��ߤ�ꡤGC�ε� +���륿���ߥ����椷����Ǥ��롥 Methods: garbage_collect - GC�Ϥ���. ��GC.start�פ�Ʊ��. + GC�Ϥ��롥��GC.start�פ�Ʊ���� Single Methods: disable - GC��ػߤ���. + GC��ػߤ��롥 enable - GC����Ĥ���. + GC����Ĥ��롥 start - GC�Ϥ���. + GC�Ϥ��롥 *** Glob(���饹) -�磻��ɥ����ɤΥ��饹. �磻��ɥ����ɤΥ�ƥ���<...>�Ȥ��������Ǥ� -��. ����ɽ���Ȥۤ�Ʊ���褦�˻Ȥ��뤬, ������ϵ�ǽ�����ʤ�. ������, �� -����ɥ����ɤ�Ÿ����ǽ������. +�磻��ɥ����ɤΥ��饹���磻��ɥ����ɤΥ�ƥ���<...>�Ȥ��������Ǥ� +�롥����ɽ���Ȥۤ�Ʊ���褦�˻Ȥ��뤬��������ϵ�ǽ�����ʤ������������� +����ɥ����ɤ�Ÿ����ǽ�����롥 SuperClass: Object @@ -2251,26 +2254,26 @@ Methods: self =~ string - �磻��ɥ����ɤ�ʸ����˥ޥå��������ˤϿ���, ���ʤ����� - nil���֤�. + �磻��ɥ����ɤ�ʸ����˥ޥå��������ˤϿ����ʤ����� + nil���֤��� each - �磻��ɥ����ɤ˥ޥå�����ե�����̾���֤����ƥ졼��. + �磻��ɥ����ɤ˥ޥå�����ե�����̾���֤����ƥ졼���� Single Methods: new(string) - ʸ�����磻��ɥ����ɤ��Ѵ��������֥������Ȥ��֤�. + ʸ�����磻��ɥ����ɤ��Ѵ��������֥������Ȥ��֤��� *** Integer(���饹) -�������饹. �ºݤϤ����礭���ˤ�ä�Fixnum��Bignum������ĤΥ��֥��饹 -�Ǽ¸�����Ƥ���. Integer�Ϥ����Υ����ѡ����饹�Ȥʤ���ݥ��饹�Ǥ� -��. Ruby�ǤϤۤȤ�ɤξ��, Fixnum��Bignum�ζ��̤�ɬ�פʤ�, ��ߤ��Ѵ� -�ϼ�ưŪ�˹Ԥʤ���. ������ӥå�����Ȥߤʤ����ˤ�, ̵�¤�Ĺ����� -�ĥӥå���ȹͤ��ƹ���ʤ�. +�������饹���ºݤϤ����礭���ˤ�ä�Fixnum��Bignum������ĤΥ��֥��饹 +�Ǽ¸�����Ƥ��롥Integer�Ϥ����Υ����ѡ����饹�Ȥʤ���ݥ��饹�Ǥ� +�롥Ruby�ǤϤۤȤ�ɤξ�硤Fixnum��Bignum�ζ��̤�ɬ�פʤ�����ߤ��Ѵ� +�ϼ�ưŪ�˹Ԥʤ��롥������ӥå�����Ȥߤʤ����ˤϡ�̵�¤�Ĺ����� +�ĥӥå���ȹͤ��ƹ���ʤ��� SuperClass: Numeric @@ -2278,25 +2281,25 @@ Methods: self[idx] - ������idx�ӥå��ܤ����åȤ���Ƥ����1, ���åȤ���Ƥ��ʤ���� - 0���֤�. + ������idx�ӥå��ܤ����åȤ���Ƥ����1�����åȤ���Ƥ��ʤ���� + 0���֤��� chr - ���ο����ɤȤ���ʸ��������ޤ�1ʸ����ʸ������֤�. ���̤� - Ĺ��1�ʾ��ʸ����ˤĤ���, ���δط��������Ω����. + ���ο����ɤȤ���ʸ��������ޤ�1ʸ����ʸ������֤������̤� + Ĺ��1�ʾ��ʸ����ˤĤ��ơ����δط��������Ω���롥 str[0].chr == str[0,1] - ������ʸ�����ϰ���(0..255)�ˤʤ�����㳰��ȯ������. + ������ʸ�����ϰ���(0..255)�ˤʤ�����㳰��ȯ�����롥 is_integer - ���Ĥ���֤�. + ���Ĥ���֤��� *** IO(���饹) -�����ϤΤ���δ��ܥ��饹. +�����ϤΤ���δ��ܥ��饹�� SuperClass: Object @@ -2306,9 +2309,9 @@ Methods: self << object - object����Ϥ���. object��ʸ����Ǥʤ����ˤϥ�å�to_s���Ѥ� - ��ʸ������Ѵ�����. self������ͤȤ���Τ�, C++�Τ褦��`<<'�� - Ϣ����Ȥ���. + object����Ϥ��롥object��ʸ����Ǥʤ����ˤϥ�å�to_s���Ѥ� + ��ʸ������Ѵ����롥self������ͤȤ���Τǡ�C++�Τ褦��`<<'�� + Ϣ����Ȥ��롥 ��: @@ -2316,89 +2319,89 @@ Methods: close - �����ϥݡ��Ȥ���������. �ʸ�Τ��Υ��֥������Ȥ��Ф������� - �����ϥ��顼�ˤʤ�. + �����ϥݡ��Ȥ��������롥�ʸ�Τ��Υ��֥������Ȥ��Ф������� + �����ϥ��顼�ˤʤ롥 each - ��Ԥ����ɤ߹���Ǥ��뤿��Υ��ƥ졼��. �Ԥζ��ڤ�ϥ����ƥ��� - ��`$/'�ˤ�ä��ѹ��Ǥ���. �ɤ߹����ʸ����ϥ����ƥ��ѿ�`$_'�� - �⥻�åȤ����. + ��Ԥ����ɤ߹���Ǥ��뤿��Υ��ƥ졼�����Ԥζ��ڤ�ϥ����ƥ��� + ��`$/'�ˤ�ä��ѹ��Ǥ��롥�ɤ߹����ʸ����ϥ����ƥ��ѿ�`$_'�� + �⥻�åȤ���롥 each_byte() - ��ʸ�������ɤ߹���Ǥ��뤿��Υ��ƥ졼��. ʸ����ʸ�������ɤ�ɽ - ��Fixnum�Ǥ���. + ��ʸ�������ɤ߹���Ǥ��뤿��Υ��ƥ졼����ʸ����ʸ�������ɤ�ɽ + ��Fixnum�Ǥ��롥 fileno to_i - IO���֥������Ȥ��ȤäƤ���ե�����ǥ�������ץ�(Fixnum)���֤�. + IO���֥������Ȥ��ȤäƤ���ե�����ǥ�������ץ�(Fixnum)���֤��� flush - �Хåե���ե�å��夹��. + �Хåե���ե�å��夹�롥 getc - ����ɤ߹����, �ɤ߹��ߤ������������ˤϤ���ʸ������֤�. �ե� - ����ν������ã�������ˤ�nil���֤�. �����ͥ��å�getc()�� - $stdin.getc��Ʊ����̣�Ǥ���. + ����ɤ߹���ǡ��ɤ߹��ߤ������������ˤϤ���ʸ������֤����ե� + ����ν������ã�������ˤ�nil���֤��������ͥ��å�getc()�� + $stdin.getc��Ʊ����̣�Ǥ��롥 gets - ����ɤ߹����, �ɤ߹��ߤ������������ˤϤ���ʸ������֤�. �ե� - ����ν������ã�������ˤ�nil���֤�. + ����ɤ߹���ǡ��ɤ߹��ߤ������������ˤϤ���ʸ������֤����ե� + ����ν������ã�������ˤ�nil���֤��� isatty - �����ϥݡ��Ȥ�tty�Ǥ����, �����֤�. + �����ϥݡ��Ȥ�tty�Ǥ�����������֤��� puts(obj) - obj����Ϥ���. ��self << obj�פ�Ʊ����̣�Ǥ���. + obj����Ϥ��롥��self << obj�פ�Ʊ����̣�Ǥ��롥 read([length]) - length�Х����ɤ߹����, ����ʸ������֤�. length����ά���줿�� - �ˤ�, ���ƤΥǡ������ɤ߹���. + length�Х����ɤ߹���ǡ�����ʸ������֤���length����ά���줿�� + �ˤϡ����ƤΥǡ������ɤ߹��ࡥ readlines - �ե�����������ɤ߹���dzƹԤ����ǤȤ��Ƥ��������֤�. + �ե�����������ɤ߹���dzƹԤ����ǤȤ��Ƥ��������֤��� sync - ���ߤν���Ʊ���⡼�ɤ��ͤ��֤�. Ʊ���⡼�ɤ����λ��Ͻ��ϴ� - ���θƽ���˥Хåե����ե�å��夵���. + ���ߤν���Ʊ���⡼�ɤ��ͤ��֤���Ʊ���⡼�ɤ����λ��Ͻ��ϴ� + ���θƽ���˥Хåե����ե�å��夵��롥 sync=(newstate) - ����Ʊ���⡼�ɤ����ꤹ��. + ����Ʊ���⡼�ɤ����ꤹ�롥 sysread(length) - stdio���ͳ������read(2)���Ѥ������Ϥ�Ԥʤ�. ���Ϥ��줿�ǡ��� - ��ޤ�ʸ������֤�. �ե�����ν������ã�������ˤ�nil���֤�. + stdio���ͳ������read(2)���Ѥ������Ϥ�Ԥʤ������Ϥ��줿�ǡ��� + ��ޤ�ʸ������֤����ե�����ν������ã�������ˤ�nil���֤��� read(2)�������ˤ��ɬ��length�Х��Ȥ�ʸ�����ɤ߹��ޤ��櫓 - �ǤϤʤ�. gets()��getc()�ʤ�stdio���ͳ�����åɤȺ��Ѥ��� - ���ȤϥХåե����������ʤɤǻפ��ư��뤳�Ȥ�����. + �ǤϤʤ���gets()��getc()�ʤ�stdio���ͳ�����åɤȺ��Ѥ��� + ���ȤϥХåե����������ʤɤǻפ��ư��뤳�Ȥ����롥 syswrite(str) - stdio���ͳ������, write(2)���Ѥ��ƽ��Ϥ�Ԥʤ�. ���Υ�å� - �ϥХåե���ʤ�stdio�����Ƥ���뤳�Ȥϰ��ڹԤʤ�ʤ�. - syswrite�ϼºݤ˽�����Х��ȿ����֤�. print()��printf()�� - syswrite()���Ѥ���ΤϿ侩�Ǥ��ʤ�. + stdio���ͳ�����ˡ�write(2)���Ѥ��ƽ��Ϥ�Ԥʤ������Υ�å� + �ϥХåե���ʤ�stdio�����Ƥ���뤳�Ȥϰ��ڹԤʤ�ʤ��� + syswrite�ϼºݤ˽�����Х��ȿ����֤���print()��printf()�� + syswrite()���Ѥ���ΤϿ侩�Ǥ��ʤ��� write(str) - str����Ϥ���. ���Ϥ����Х��ȿ����֤�. + str����Ϥ��롥���Ϥ����Х��ȿ����֤��� *** Kernel(���饹) -���ƤΥ��饹�δ��쥯�饹. Ruby�Ȥ߹��ߤ����Ƥδؿ���åɤϤ��Υ��饹 -���������Ƥ���. �ؿ���åɤˤĤ��Ƥϡִؿ��פι��ܤȤΤ���. +���ƤΥ��饹�δ��쥯�饹��Ruby�Ȥ߹��ߤ����Ƥδؿ���åɤϤ��Υ��饹 +���������Ƥ��롥�ؿ���åɤˤĤ��Ƥϡִؿ��פι��ܤȤΤ��ȡ� SuperClass: �ʤ� @@ -2406,74 +2409,74 @@ Methods: ! self - ����. Non-nil�Υ��֥������Ȥξ���˵�(nil)���֤�. ���Υ�� - �ɤ�Nil���饹�ǤϺ�������쿿���֤�. + ���ꡥNon-nil�Υ��֥������Ȥξ���˵�(nil)���֤������Υ�� + �ɤ�Nil���饹�ǤϺ�������쿿���֤��� self == other equal(other) - ���֥������Ȥΰ���Ƚ��. �쥷���ФȰ����ΰ��������פ����, ���� - �֤�. Kernel���饹������Ǥ������Υ��֥������Ȥ�Ʊ��λ������� - ��. "=="��åɤϳƥ��֥������Ȥ������˱����ƺ��������ɬ�פ� - ����. "=="��åɤ������������ˤ�, hash��åɤ⤽��˹�� - ���ƺ��������ɬ�פ�����. + ���֥������Ȥΰ���Ƚ�ꡥ�쥷���ФȰ����ΰ��������פ���������� + �֤���Kernel���饹������Ǥ������Υ��֥������Ȥ�Ʊ��λ������� + ����"=="��åɤϳƥ��֥������Ȥ������˱����ƺ��������ɬ�פ� + ���롥"=="��åɤ������������ˤϡ�hash��åɤ⤽��˹�� + ���ƺ��������ɬ�פ����롥 - equal()��åɤ�"=="��åɤ���̾��, "=="������������Ǥ� - ���֥������Ȥ�Ʊ����Ƚ���Ԥʤ�������Ѥ�����. ��ä� - equal()��åɤϥ��֥��饹�Ǻ��������٤��ǤϤʤ�. + equal()��åɤ�"=="��åɤ���̾�ǡ�"=="������������Ǥ� + ���֥������Ȥ�Ʊ����Ƚ���Ԥʤ�������Ѥ����롥��ä� + equal()��åɤϥ��֥��饹�Ǻ��������٤��ǤϤʤ��� self != other - "=="������. ������"=="��åɤ�ƤӽФ��Ƥ���Τ�, ������Ϻ� - �������ɬ�פϤʤ�. + "=="�����ꡥ������"=="��åɤ�ƤӽФ��Ƥ���Τǡ�������Ϻ� + �������ɬ�פϤʤ��� self =~ other - �ޥå�. �ǥե���Ȥ�ư���"=="��Ʊ���Ǥ���. "=~"��case����Ӥ� - ���Ѥ�����. + �ޥå����ǥե���Ȥ�ư���"=="��Ʊ���Ǥ��롥"=~"��case����Ӥ� + ���Ѥ����롥 !~ - "=~"������. ������"=~"��åɤ�ƤӽФ��Ƥ���Τ�, ������Ϻ� - �������ɬ�פϤʤ�. + "=~"�����ꡥ������"=~"��åɤ�ƤӽФ��Ƥ���Τǡ�������Ϻ� + �������ɬ�פϤʤ��� self :: other - self��other�����ǤȤ���Ĺ��2��������֤�. �������������Ȥ��� - ��̣�� [self, other]��Ʊ��Ư���뤬, ������������鷺���˸� - Ψ���ɤ�. ���α黻�Ҥϱ����Ǥ���Τ�, a::b::c �� (a::(b::c)) - �Ȳ�ᤵ���. + self��other�����ǤȤ���Ĺ��2��������֤����������������Ȥ��� + ��̣�� [self, other]��Ʊ��Ư���뤬��������������鷺���˸� + Ψ���ɤ������α黻�Ҥϱ����Ǥ���Τǡ�a::b::c �� (a::(b::c)) + �Ȳ�ᤵ��롥 is_nil - ���֥������Ȥ�nil�Ǥ��뤫�ɤ���. Kernel���饹������ǤϿ����� - ��. Nil���饹�Ǻ��������Ƥ���. + ���֥������Ȥ�nil�Ǥ��뤫�ɤ�����Kernel���饹������ǤϿ����� + ����Nil���饹�Ǻ��������Ƥ��롥 id - �ƥ��֥������Ȥ��Ф��ư�դ�Fixnum���֤�. ��, Fixnum�ϼ�ʬ���Ȥ��� - ���Τ�, id�����פ��Ƥ�Ʊ�����֥������ȤǤ��뤳�Ȥ��ݾڤ���ʤ�. - �Ĥޤ�, + �ƥ��֥������Ȥ��Ф��ư�դ�Fixnum���֤�������Fixnum�ϼ�ʬ���Ȥ��� + ���Τǡ�id�����פ��Ƥ�Ʊ�����֥������ȤǤ��뤳�Ȥ��ݾڤ���ʤ��� + �Ĥޤꡤ obj1.id == obj2.id - ����Ω���Ƥ�, �ɤ��餫��Fixnum�Ǥ����, obj1��obj2��Ʊ���Ǥ��� - �Ȥϸ¤�ʤ�. ������, ξ����Fixnum�Ǥʤ����Ȥ��ݾڤǤ����, 2 - �ĤΥ��֥������Ȥ�Ʊ��Ǥ��뤳�Ȥϳμ¤Ǥ���. + ����Ω���Ƥ⡤�ɤ��餫��Fixnum�Ǥ���С�obj1��obj2��Ʊ���Ǥ��� + �Ȥϸ¤�ʤ�����������ξ����Fixnum�Ǥʤ����Ȥ��ݾڤǤ���С�2 + �ĤΥ��֥������Ȥ�Ʊ��Ǥ��뤳�Ȥϳμ¤Ǥ��롥 hash - ���֥������ȤΥϥå�����(Fixnum)���֤�. Dict���饹�ǥ����Ȥʤ� + ���֥������ȤΥϥå�����(Fixnum)���֤���Dict���饹�ǥ����Ȥʤ� ���֥������Ȥ��Ǽ����Τ��Ѥ����Ƥ���.��A == B�פ���Ω���� - ����ɬ����A.hash == B.hash�פ���Ω����ɬ�פ�����Τ�, "=="��� - ����������ˤ�ɬ��������⤽��˹�碌�ƺ�������뤳��. + ����ɬ����A.hash == B.hash�פ���Ω����ɬ�פ�����Τǡ�"=="��� + ����������ˤ�ɬ��������⤽��˹�碌�ƺ�������뤳�ȡ� *** Math(�⥸�塼��) -��ư�������黻�ݡ��Ȥ��륯�饹. Math�⥸�塼���Ʊ������Υ�å� -���ðۥ�åɤȤ�ξ�����������Ƥ���Τ�, �ðۥ�åɤ�ƤӽФ��ƻ� -���Ȥ�����, ���饹�˥��롼�ɤ��ƻȤ��Ȥ����Ȥ�ξ�����Ǥ���. +��ư�������黻�ݡ��Ȥ��륯�饹��Math�⥸�塼���Ʊ������Υ�å� +���ðۥ�åɤȤ�ξ�����������Ƥ���Τǡ��ðۥ�åɤ�ƤӽФ��ƻ� +���Ȥ����ȡ����饹�˥��롼�ɤ��ƻȤ��Ȥ����Ȥ�ξ�����Ǥ��롥 ��: @@ -2486,37 +2489,37 @@ Single Methods: atan2(x, y) - �С�-�Ф��ϰϤ�X/Y�Υ�����������Ȥ��֤�. + �С�-�Ф��ϰϤ�X/Y�Υ�����������Ȥ��֤��� cos(x) sin(x) tan(x) - �饸�����ɽ���줿x�λ��Ѵؿ����ͤ��֤�. + �饸�����ɽ���줿x�λ��Ѵؿ����ͤ��֤��� exp(x) - x�λؿ��ؿ����ͤ��֤�. + x�λؿ��ؿ����ͤ��֤��� log(x) - x�μ����п����֤�. + x�μ����п����֤��� log10(x) - x�ξ����п����֤�. + x�ξ����п����֤��� sqrt(x) - x��ʿ�������֤�. x���ͤ���Ǥ�����ˤ��㳰��ȯ��������. + x��ʿ�������֤���x���ͤ���Ǥ�����ˤ��㳰��ȯ�������롥 cbrt(x) - x��Ω�������֤�. + x��Ω�������֤��� *** Module(���饹) -�⥸�塼��Υ��饹. +�⥸�塼��Υ��饹�� SuperClass: Object @@ -2525,22 +2528,22 @@ Private Methods: attr(name[, public]) ���Υ⥸�塼��롼�ɤ������饹�Υ������Ф��� - name�ǻ��ꤵ���°�����ղä�, °�����Ф��륢��������åɤ��� - ������. attr("attr")�ϥ��饹����˰ʲ��˼��������ɤ��ɲä���� - �Ȥۤ�Ʊ���Ǥ���. + name�ǻ��ꤵ���°�����ղä���°�����Ф��륢��������åɤ��� + �����롥attr("attr")�ϥ��饹����˰ʲ��˼��������ɤ��ɲä���� + �Ȥۤ�Ʊ���Ǥ��롥 def attr; @attr; end - ��ά��ǽ����2����public��Ϳ������, ���Ĥ����ͤ�nil�Ǥʤ����� - ��, ����°���ˤ�°�������åɤ��Ѱդ���, ��������������ǽ�� - �ʤ�. attr("attr", %TRUE)�ϥ��饹����˰ʲ��Υ����ɤ��ɲä��� - �ΤȤۤ�Ʊ���Ǥ���. + ��ά��ǽ����2����public��Ϳ�����ơ����Ĥ����ͤ�nil�Ǥʤ����� + �Ϥ���°���ˤ�°�������åɤ��Ѱդ��졤��������������ǽ�ˤ� + �롥attr("attr", %TRUE)�ϥ��饹����˰ʲ��Υ����ɤ��ɲä���� + �Ȥۤ�Ʊ���Ǥ��롥 def attr; @attr; end def attr=(val); @attr = val; end - °�����������åɤ��������뤳�Ȥˤ�ä�, ������������ư - ����ѹ��Ǥ���. �㤨�� + °�����������åɤ��������뤳�Ȥˤ�äơ�������������ư + ����ѹ��Ǥ��롥�㤨�� attr("test", %TRUE) def test=(val) @@ -2548,31 +2551,31 @@ Private Methods: print("and now is ", @test = val, "\n") end - �Τ褦���������°�����ͤ�ɽ������褦�ʤ��Ȥ���ǽ�Ǥ���. attr - �ϥ���������åɤ����Ǥ��������Ƥ������, �ǥե���ȤΥ� - ��������åɤ�������ʤ�. + �Τ褦���������°�����ͤ�ɽ������褦�ʤ��Ȥ���ǽ�Ǥ��롥attr + �ϥ���������åɤ����Ǥ��������Ƥ�����ϡ��ǥե���ȤΥ� + ��������åɤ�������ʤ��� Methods: export(name[, name..]) - name�ǻ��ꤵ�줿��åɤ��̾�����ǸƤӽФ���ǽ�ˤ���. ���Ǥ� - �̾��åɤǤ�����ˤϲ��⤷�ʤ�. + name�ǻ��ꤵ�줿��åɤ��̾�����ǸƤӽФ���ǽ�ˤ��롥���Ǥ� + �̾��åɤǤ�����ˤϲ��⤷�ʤ��� to_s - �⥸�塼���ʸ����ɽ�����֤�. �⥸�塼��ξ���ʸ����ɽ���ϥ� - ���塼��̾�Ǥ���. + �⥸�塼���ʸ����ɽ�����֤����⥸�塼��ξ���ʸ����ɽ���ϥ� + ���塼��̾�Ǥ��롥 unexport(name[, name..]) - name�ǻ��ꤵ�줿��åɤ�ؿ������Ǥ����ƤӽФ���ǽ�ˤ���. �� - �Ǥ˴ؿ���åɤǤ�����ˤϲ��⤷�ʤ�. + name�ǻ��ꤵ�줿��åɤ�ؿ������Ǥ����ƤӽФ���ǽ�ˤ��롥�� + �Ǥ˴ؿ���åɤǤ�����ˤϲ��⤷�ʤ��� *** Nil(���饹) -����ɽ�����֥�������nil�Υ��饹. ���ѿ�(����)nil��Nil���饹��ͣ��Υ� -���Ǥ���. +����ɽ�����֥�������nil�Υ��饹�����ѿ�(����)nil��Nil���饹��ͣ��Υ� +���Ǥ��롥 SuperClass: Kernel @@ -2580,19 +2583,19 @@ Methods: self + other - other������, ��ư��������, ʸ����, ����Ǥ����, other���֤�. + other����������ư����������ʸ��������Ǥ������other���֤��� ! self - ��˿����֤�. + ��˿����֤��� is_nil - ��˿����֤�. + ��˿����֤��� *** Numeric(���饹) -�����̤�������ɽ����ݥ��饹. +�����̤�������ɽ����ݥ��饹�� SuperClass: Object @@ -2606,26 +2609,26 @@ Methods: - self - ��0 - self�פ��ͤ��֤�. ���֥��饹�Ǥ���ΨŪ�˺��������뤳 - �Ȥ����Ԥ����. + ��0 - self�פ��ͤ��֤������֥��饹�Ǥ���ΨŪ�˺��������뤳 + �Ȥ����Ԥ���롥 abs - �����ͤ��֤�. + �����ͤ��֤��� divmod(other) - ���Ⱦ�;��2���Ǥ�������֤�. + ���Ⱦ�;��2���Ǥ�������֤��� next - ���ο����֤�. ���ο��ȤϤ��ο���ۤ���Ǿ��������Ǥ���. + ���ο����֤������ο��ȤϤ��ο���ۤ���Ǿ��������Ǥ��롥 *** Object(���饹) -���Ƥ��̾說�饹�Υ����ѥ��饹. �̾說�饹�Υ����ΰ���Ū�ʿ��� -����������Ƥ���. ���Υ��饹�Υ��֥��饹�Ǥʤ����饹��Kernel��Nil��, -�Ȥ߹��ߴؿ���������Ƥ���Builtin�����Ǥ���. +���Ƥ��̾說�饹�Υ����ѥ��饹���̾說�饹�Υ����ΰ���Ū�ʿ��� +����������Ƥ��롥���Υ��饹�Υ��֥��饹�Ǥʤ����饹��Kernel��Nil�ȡ� +�Ȥ߹��ߴؿ���������Ƥ���Builtin�����Ǥ��롥 SuperClass: Builtin @@ -2633,83 +2636,99 @@ Methods: is_member_of(class) - ���֥�������self�����饹class�Υ����Ǥ����,�����֤�. + ���֥�������self�����饹class�Υ����Ǥ�����������֤��� is_kind_of(class) ���֥�������self�����饹class�����Υ��֥��饹�Υ����� - �����, �����֤�. + ������������֤��� clone - ���֥������Ȥ�ʣ������. ������¨�ͤǤ���Fixnum���饹 - �ʳ��Υ��饹�ξ��,��obj.equal(obj.clone)�פϵ��Ǥ��뤬, ¿�� - �ξ���obj == obj.clone�פϿ��Ǥ���. + ���֥������Ȥ�ʣ�����롥������¨�ͤǤ���Fixnum���饹 + �ʳ��Υ��饹�ξ�硤��obj.equal(obj.clone)�פϵ��Ǥ��뤬��¿�� + �ξ���obj == obj.clone�פϿ��Ǥ��롥 to_s - ���֥������Ȥ�ʸ����ɽ�����֤�. ���Υ�åɤ�����Ū��print() - ��format()��åɤ��Ѥ����Ƥ���. + ���֥������Ȥ�ʸ����ɽ�����֤������Υ�åɤ�����Ū��print() + ��format()��åɤ��Ѥ����Ƥ��롥 to_a - ���֥������Ȥ�������Ѵ�����. �����ͥ륯�饹���������Ƥ���� - �ե���Ȥ�, ���Υ��֥������ȼ��Ȥ�ޤ�1���Ǥ�������֤�. + ���֥������Ȥ�������Ѵ����롥�����ͥ륯�饹���������Ƥ���� + �ե���Ȥϡ����Υ��֥������ȼ��Ȥ�ޤ�1���Ǥ�������֤��� *** Process(�⥸�塼��) -�ץ������˴ؤ�������Ԥʤ�����Υ⥸�塼��. Math�⥸�塼���Ʊ�ͤ��� -�ƤΥ�åɤ��ðۥ�åɤȤ��Ƥ��̾�Υ�åɤȤ��Ƥ�Ȥ���. -Process�ϥץ��������֥������ȤΥ��饹�ǤϤʤ���, �ץ��������Υ�� -�ɤ�ޤȤ��ΤǤ��뤳�Ȥ����դ��뤳��. +�ץ������˴ؤ�������Ԥʤ�����Υ⥸�塼�롥Math�⥸�塼���Ʊ�ͤ��� +�ƤΥ�åɤ��ðۥ�åɤȤ��Ƥ��̾�Υ�åɤȤ��Ƥ�Ȥ��롥 +Process�ϥץ��������֥������ȤΥ��饹�ǤϤʤ��ơ��ץ��������Υ�� +�ɤ�ޤȤ��ΤǤ��뤳�Ȥ����դ��뤳�ȡ� Methods: Single Methods: + egid + + �ץ������θ��ߤμ¸�GID���֤��� + + egid=(gid) + + �ץ������θ��ߤμ¸�GID��gid�˥��åȤ��롥 + euid - �ץ������θ��ߤμ¸�UID���֤�. + �ץ������θ��ߤμ¸�UID���֤��� euid=(uid) - �ץ������θ��ߤμ¸�UID��uid�˥��åȤ���. + �ץ������θ��ߤμ¸�UID��uid�˥��åȤ��롥 getpgrp([pid]) pid�ǻ��ꤵ�줿�ץ����������߽�°���Ƥ���ץ��������롼�פ�id - ���֤�. pid���ά��������pid��0��Ϳ�������ϸ��¹Ԥ��Ƥ���� - ���������оݤˤ���. + ���֤���pid���ά��������pid��0��Ϳ�������ϸ��¹Ԥ��Ƥ���� + ���������оݤˤ��롥 getpriority(which, who) - which��who�ǻ��ꤵ���ץ�����, �ץ��������롼��, �桼���θ��� - ��ͥ���̤��֤�. �ܺ٤�getpriority(2)��. Process�⥸�塼 - ��Ǥ�which�Ȥ��ƻ���Ǥ������%PRIO_PROCESS, %PRIO_PGRP, - %PRIO_USER���������Ƥ���. + which��who�ǻ��ꤵ���ץ��������ץ��������롼�ס��桼���θ��� + ��ͥ���̤��֤����ܺ٤�getpriority(2)�ȡ�Process�⥸�塼 + ��Ǥ�which�Ȥ��ƻ���Ǥ������%PRIO_PROCESS��%PRIO_PGRP�� + %PRIO_USER���������Ƥ��롥 + + gid + + �ץ������θ��ߤμ�GID���֤��� + + gid= + + �ץ������θ��ߤμ�GID��gid�˥��åȤ���. pid - �ץ������Υץ�����ID���֤�. ����ϥ����ƥ��ѿ�`$$'���ͤ�Ʊ���� - ����. + �ץ������Υץ�����ID���֤�������ϥ����ƥ��ѿ�`$$'���ͤ�Ʊ���� + ���롥 ppid - �ƥץ������Υץ������Υץ�����ID���֤�. UNIX�Ǥ�ľ�ܤοƥץ��� - ������λ�������, �ƥץ�������pid��1(init��pid)�ˤʤ�. + �ƥץ������Υץ������Υץ�����ID���֤���UNIX�Ǥ�ľ�ܤοƥץ��� + ������λ������硤�ƥץ�������pid��1(init��pid)�ˤʤ롥 setpgrp(pid, pgrp) - pid�ǻ��ꤵ�줿�ץ������Υץ��������롼�פ�pgrp�ˤ���. pid��0 - ��Ϳ����ȸ��¹���Υץ��������оݤˤ���. + pid�ǻ��ꤵ�줿�ץ������Υץ��������롼�פ�pgrp�ˤ��롥pid��0 + ��Ϳ����ȸ��¹���Υץ��������оݤˤ��롥 setpriority(which, who, prio) - which��who�ǻ��ꤵ���ץ�����, �ץ��������롼��, �桼���θ��� - ��ͥ���̤�prio�����ꤹ��. �ܺ٤�setpriority(2)�ȤΤ���. + which��who�ǻ��ꤵ���ץ��������ץ��������롼�ס��桼���θ��� + ��ͥ���̤�prio�����ꤹ�롥�ܺ٤�setpriority(2)�ȤΤ��ȡ� uid - �ץ������θ��ߤμ�UID���֤�. + �ץ������θ��ߤμ�UID���֤��� uid= @@ -2717,21 +2736,21 @@ Single Methods: *** Range(���饹) -�ϰϥ��֥������ȤΥ��饹. �ϰϥ��֥������Ȥ�`..'�黻�Ҥˤ�ä���������, +�ϰϥ��֥������ȤΥ��饹���ϰϥ��֥������Ȥ�`..'�黻�Ҥˤ�ä��������졤 ����Ū�ˤϰʲ��Τ褦�ʻȤ����� for i in 1..5 ... end -������, ���ξ��ϰʲ�������®��. +�����������ξ��ϰʲ�������®��. do 1.upto(5) ... end �ϰϥ��֥������Ȥ���������`..'�黻�Ҥ�ξ�դ�Comparable��ޤ९�饹�Υ� -���Ǥ���в��Ǥ��ʤ�. �ϰϤϻ����Ƚ�����ޤळ�Ȥ����դ��� +���Ǥ���в��Ǥ��ʤ����ϰϤϻ����Ƚ�����ޤळ�Ȥ����դ��� ����. SuperClass: Object @@ -2742,21 +2761,21 @@ Methods: self =~ other - self��other��Ʊ�����饹���Ф����ϰϥ��֥������Ȥ�, �����ϰ��� - ��other�������(start <= other <= end),�����֤�. �����caseʸ - ���ϰϻ��ꤹ����������Ǥ���. �㤨�� + self��other��Ʊ�����饹���Ф����ϰϥ��֥������Ȥǡ������ϰ��� + ��other�������(start <= other <= end)�������֤��������caseʸ + ���ϰϻ��ꤹ����������Ǥ��롥�㤨�� case i when 1, 3..5 ... end case - �Τ褦�ʥ����ɤ���Ȥ��Ǥ���. + �Τ褦�ʥ����ɤ���Ȥ��Ǥ��롥 each - �ϰ����¸�ߤ��륪�֥������Ȥ�Ϳ���륤�ƥ졼��. ���forʸ�Τ� - ����Ѥ�����. + �ϰ����¸�ߤ��륪�֥������Ȥ�Ϳ���륤�ƥ졼�������forʸ�Τ� + ����Ѥ����롥 end @@ -2764,48 +2783,48 @@ Methods: start - �ϰϤλ������֤�. + �ϰϤλ������֤��� *** Socket(���饹) SuperClass: BasicSocket -�����åȤ��Τ�Τ��Ф��륷���ƥॳ�����٥�Υ������������륯�饹. -Perl�Υ����åȤ��Ф��륢��������Ʊ��٥�ε�ǽ�����Ƥ���. ���Υ��� -���Ǥϥ����åȥ��ɥ쥹��pack���줿ʸ�����, ���ꤹ��. UDP�����åȤϤ� -�Υ��饹��Ȥä����Ѥ���. +�����åȤ��Τ�Τ��Ф��륷���ƥॳ�����٥�Υ������������륯�饹�� +Perl�Υ����åȤ��Ф��륢��������Ʊ��٥�ε�ǽ�����Ƥ��롥���Υ��� +���Ǥϥ����åȥ��ɥ쥹��pack���줿ʸ����ǡ����ꤹ�롥UDP�����åȤϤ� +�Υ��饹��Ȥä����Ѥ��롥 Methods: accept - ��������³������դ���, ��������³���Ф��륽���åȤȥ��ɥ쥹�� - �ڥ����֤�. accept(2)��. + ��������³������դ��ơ���������³���Ф��륽���åȤȥ��ɥ쥹�� + �ڥ����֤���accept(2)�ȡ� bind(addr) - bind(2)��Ʊ��Ư����. addr��pack���줿�����åȥ��ɥ쥹��¤ - �ΤǤ���. + bind(2)��Ʊ��Ư���롥addr��pack���줿�����åȥ��ɥ쥹��¤ + �ΤǤ��롥 connect(addr) - connect(2)��Ʊ��Ư����. addr��pack���줿�����åȥ��ɥ쥹�� - ¤�ΤǤ���. + connect(2)��Ʊ��Ư���롥addr��pack���줿�����åȥ��ɥ쥹�� + ¤�ΤǤ��롥 listen(backlog) - listen(2)��Ʊ��Ư����. + listen(2)��Ʊ��Ư���롥 recv(len[, flags]) - �����åȤ���ǡ�����������, ʸ����Ȥ����֤�. len�ϼ������ - �����Ĺ������ꤹ��. flags�ˤĤ��Ƥ�recv(2)��. flags�Υ� - �ե�����ͤ�0�Ǥ���. + �����åȤ���ǡ����������ꡤʸ����Ȥ����֤���len�ϼ������ + �����Ĺ������ꤹ�롥flags�ˤĤ��Ƥ�recv(2)�ȡ�flags�Υ� + �ե�����ͤ�0�Ǥ��롥 recvfrom(len[, flags]) - recv��Ʊ�ͤ˥����åȤ���ǡ����������뤬, ����ͤ�ʸ������� - ����åȤΥ��ɥ쥹�Υڥ��Ǥ���. �����ˤĤ��Ƥ�recv��Ʊ��. + recv��Ʊ�ͤ˥����åȤ���ǡ����������뤬������ͤ�ʸ������� + ����åȤΥ��ɥ쥹�Υڥ��Ǥ��롥�����ˤĤ��Ƥ�recv��Ʊ�͡� send(mesg, flags[, to]) @@ -2818,26 +2837,26 @@ Single Methods: open(domain, type, protocol) new(domain, type, protocol) - �����������åȤ���������. domain, type, protocol�ϥ��롼�� - �ե�������������Ƥ�������ͤǻ��ꤹ��. domain��type�˴ؤ��� - ��, ʸ����ǻ���Ǥ��뤬, ���٤ƤС����Ƥ����ݾڤϤʤ�. + �����������åȤ��������롥domain��type��protocol�ϥ��롼�� + �ե�������������Ƥ�������ͤǻ��ꤹ�롥domain��type�˴ؤ��� + �ϡ�ʸ����ǻ���Ǥ��뤬�����٤ƤС����Ƥ����ݾڤϤʤ��� socketpair(domain, type, protocol) - �����åȤΥڥ���������, 2���Ǥ�����Ȥ����֤�. �����λ���� - open��Ʊ���Ǥ���. + �����åȤΥڥ�����������2���Ǥ�����Ȥ����֤��������λ���� + open��Ʊ���Ǥ��롥 *** Regexp(���饹) -����ɽ���Υ��饹. ����ɽ���Υ�ƥ���/.../�Ȥ���������ɽ����, ưŪ�� +����ɽ���Υ��饹������ɽ���Υ�ƥ���/.../�Ȥ���������ɽ������ưŪ�� �������뤿��ˤ� Regexp.new(ʸ����) -�Ȥ���. ������, String���饹��`=~'��Ϥ�Ȥ���¿���Υ�åɤ�����ɽ�� -���ؤ���ʸ����Ϳ����줿���ˤ�����Ū������ɽ������������Τ�, ���� -�����Ȥ��������Ȼפ����ʳ�������Ū�������������Ȼפ����ȤϾ��ʤ��� -����. +�Ȥ��롥��������String���饹��`=~'��Ϥ�Ȥ���¿���Υ�åɤ�����ɽ�� +���ؤ���ʸ����Ϳ����줿���ˤ�����Ū������ɽ������������Τǡ����� +�����Ȥ��������Ȼפ����䡤����ɽ������ʸ����ʸ���ζ��̤�����Ū�˻� +�ꤷ�������ʤɰʳ�������Ū�������������Ȼפ����ȤϾ��ʤ��Ϥ����� SuperClass: Object @@ -2845,24 +2864,28 @@ Methods: self =~ string - ����ɽ����ʸ����˥ޥå��������, �ޥå��������֤��֤�. �ޥå� - ���ʤ�����nil���֤�. + ����ɽ����ʸ����˥ޥå�������硤�ޥå��������֤��֤����ޥå� + ���ʤ�����nil���֤��� ~ self - ��$_ =~ self�פ�Ʊ��. + ��$_ =~ self�פ�Ʊ���� Single Methods: - complie(string) - new(string) + complie(string[, casefold]) + new(string[, casefold]) - ʸ���������ɽ�����Ѵ��������֥������Ȥ��֤�. + ʸ���������ɽ�����Ѵ��������֥������Ȥ��֤�����ά��ǽ����2�� + ����Ϳ����줿���ˤϡ��������������ɽ�����֥������Ȥϥ����ƥ� + �ѿ�`$='���ͤ˴ؤ�餺�����λ�����ʸ����ʸ����̵�뤷�����λ��� + ���̤��롥���ꤵ��ʤ����ϥޥå���Ԥʤä������Υ����ƥ��ѿ� + `$='���ͤˤ�äƶ��̤��뤫���ʤ��������ꤵ��롥 *** BasicSocket(���饹) -�����åȤ�ɽ����ݥ��饹. ����Ū�ʥ����å����ϥ��֥��饹����������. -�㤨�Х����ͥåȥɥᥤ��ξ���TCPsocket���Ѥ���. +�����åȤ�ɽ����ݥ��饹������Ū�ʥ����å����ϥ��֥��饹���������롥 +�㤨�Х����ͥåȥɥᥤ��ξ���TCPsocket���Ѥ��롥 SuperClass: IO @@ -2870,36 +2893,36 @@ Methods: getopt(level, optname) - �����åȤΥ��ץ������������. getsockopt(2)�ȤΤ���. �� - ���������ץ��������Ƥ�ޤ�ʸ������֤�. + �����åȤΥ��ץ�����������롥getsockopt(2)�ȤΤ��ȡ��� + ���������ץ��������Ƥ�ޤ�ʸ������֤��� getpeername - ��³�������Υ����åȤξ��������. �ѥå����줿sockaddr��¤�� - ��٥��˥���פ���ʸ�����֤����. getpeername(2)�ȤΤ���. + ��³�������Υ����åȤξ�������롥�ѥå����줿sockaddr��¤�� + ��٥��˥���פ���ʸ�����֤���롥getpeername(2)�ȤΤ��ȡ� getsockname - �����åȤξ��������. �ѥå����줿sockaddr��¤�Τ�٥��˥���� - ����ʸ�����֤����. getsockname(2)�ȤΤ���. + �����åȤξ�������롥�ѥå����줿sockaddr��¤�Τ�٥��˥���� + ����ʸ�����֤���롥getsockname(2)�ȤΤ��ȡ� setopt(level, optname, optval) - �����åȤΥ��ץ��������ꤹ��. setsockopt(2)�ȤΤ���. + �����åȤΥ��ץ��������ꤹ�롥setsockopt(2)�ȤΤ��ȡ� shutdown(how) - �����åȤΰʹߤ���³��λ������. how��0�Ǥ����, �ʹߤμ�����, - how��1�Ǥ������, �ʹߤ����������ݤ����. how��2�λ��ˤ�, ���� - �ʹߤ�����, �����Ȥ�˵��ݤ����. shutdown(2)��. + �����åȤΰʹߤ���³��λ�����롥how��0�Ǥ�������ʹߤμ������� + how��1�Ǥ�����ϡ��ʹߤ����������ݤ���롥how��2�λ��ˤϡ����� + �ʹߤ������������Ȥ�˵��ݤ���롥shutdown(2)�ȡ� *** String(���饹) -ʸ���饹. Ruby��ʸ����ϥ̥륿���ߥ͡��ȤǤϤʤ��Τ�, �Х��ʥ�ǡ� -���ⰷ����. ���äƤɤ��餫�Ȥ�����ñ�ʤ�ʸ����Ȥ������Х�����Ǥ���. -���λ��ۤ˴�Ť���, ����ɽ���˴ؤ����åɰʳ���2byte�Ϥ�ʸ����ռ� -���Ƥ��ʤ�. ����Ϻ�Ԥμ�ȴ���ǤϤʤ��տ�Ū�ˤ������Ƥ���ΤǤ���(�� -���Ƥ���). +ʸ���饹��Ruby��ʸ����ϥ̥륿���ߥ͡��ȤǤϤʤ��Τǡ��Х��ʥ�ǡ� +���ⰷ���롥���äƤɤ��餫�Ȥ�����ñ�ʤ�ʸ����Ȥ������Х�����Ǥ��롥 +���λ��ۤ˴�Ť��ơ�����ɽ���˴ؤ����åɰʳ���2byte�Ϥ�ʸ����ռ� +���Ƥ��ʤ�������Ϻ�Ԥμ�ȴ���ǤϤʤ��տ�Ū�ˤ������Ƥ���ΤǤ���(�� +���Ƥ���)�� SuperClass: Object @@ -2909,123 +2932,123 @@ Methods: self + other - ʸ�����Ϣ��. Ϣ�뤵�줿ʸ������֤�. + ʸ�����Ϣ�롥Ϣ�뤵�줿ʸ������֤��� self * times - ʸ����η����֤�. �㤨�� + ʸ����η����֤����㤨�� "x" * 4 == "xxxx" - �Ǥ���. + �Ǥ��롥 self == other self > other - ʸ��������. �����ƥ��ѿ�$=��nil�Ǥʤ����ˤ���ʸ����ʸ����� - �̤�������Ӥ�Ԥʤ�. + ʸ�������ӡ������ƥ��ѿ�$=��nil�Ǥʤ����ˤ���ʸ����ʸ����� + �̤�������Ӥ�Ԥʤ��� self =~ other - ʸ����Υޥå�. other������ɽ����ʸ����. other��ʸ����ξ��� - ��ưŪ������ɽ�����Ѵ������. �ޥå��������ϥޥå���������, - ���ʤ��ä�����nil���֤�. + ʸ����Υޥå���other������ɽ����ʸ����other��ʸ����ξ��� + ��ưŪ������ɽ�����Ѵ�����롥�ޥå��������ϥޥå��������֡� + ���ʤ��ä�����nil���֤롥 ~ self - ��$_ =~ self�פ�Ʊ��. + ��$_ =~ self�פ�Ʊ���� self[nth] self[beg..end] self[beg,len] - ���Ƥμ��Ф�. 1���ܤη����Ǥ�nth�Х����ܤΥǡ�����Fixnum�Ȥ� - ���֤�. 2���ܤη����Ǥ�beg�Х����ܤ���end�Х����ܤޤǤ���ʬʸ - ������֤�(ξü��ޤ�). 3���ܤη����Ǥ�beg�Х����ܤ���len�Х� - ��ʬ����ʬʸ������֤�. + ���Ƥμ��Ф���1���ܤη����Ǥ�nth�Х����ܤΥǡ�����Fixnum�Ȥ� + ���֤���2���ܤη����Ǥ�beg�Х����ܤ���end�Х����ܤޤǤ���ʬʸ + ������֤�(ξü��ޤ�)��3���ܤη����Ǥ�beg�Х����ܤ���len�Х� + ��ʬ����ʬʸ������֤��� self[nth] = val self[beg..end] = val self[beg,len] = val - ���Ƥι���. 1���ܤη����Ǥ�nth�Х����ܤΥǡ�����val (����)���� - ������. 2���ܤη�����beg�Х����ܤ���end�Х����ܤޤǤ���ʬʸ�� - ���val�Ȥ���Ϳ����줿ʸ������֤�������. 3���ܤη�����beg�� + ���Ƥι�����1���ܤη����Ǥ�nth�Х����ܤΥǡ�����val (����)���� + �����롥2���ܤη�����beg�Х����ܤ���end�Х����ܤޤǤ���ʬʸ�� + ���val�Ȥ���Ϳ����줿ʸ������֤������롥3���ܤη�����beg�� �����ܤ���len�Х���ʬ����ʬʸ�����val�Ȥ���Ϳ����줿ʸ����� - �֤�������. + �֤������롥 capitalize - ʸ������κǽ��ʸ����(���줬����ե��٥åȤǤ����), ��ʸ���� - �Ѵ���, �Ĥ�ʸ������Υ���ե��٥åȤ�ʸ�����֤�������. + ʸ������κǽ��ʸ����(���줬����ե��٥åȤǤ����)����ʸ���� + �Ѵ������Ĥ�ʸ������Υ���ե��٥åȤ�ʸ�����֤������롥 chop - ʸ����κǸ�ΥХ��Ȥ��ڤ���Ȥ�. ����ʸ������ѹ����뤳�Ȥ��� - �դ��뤳��. + ʸ����κǸ�ΥХ��Ȥ��ڤ���Ȥ�������ʸ������ѹ����뤳�Ȥ��� + �դ��뤳�ȡ� crypt(salt) - crypt(3)���Ѥ��ưŹ沽����ʸ������֤�. salt��2�Х��Ȱʾ��Ĺ - ����Ǥ�դ�ʸ����Ǥ���. + crypt(3)���Ѥ��ưŹ沽����ʸ������֤���salt��2�Х��Ȱʾ��Ĺ + ����Ǥ�դ�ʸ����Ǥ��롥 delete(str) - ʸ����Τ���, str�˴ޤޤ��ʸ����������. ʸ����λ����tr�� - Ʊ�ͤǤ���, a-b��a����b�ޤǤ��ϰϤ�, ��Ƭ��^��ʸ���������(�� - �ޤ�Ƥʤ���Τ����)���̣����. ����ʸ������ѹ����뤳�Ȥ��� - �դ��뤳��. + ʸ����Τ�����str�˴ޤޤ��ʸ���������롥ʸ����λ����tr�� + Ʊ�ͤǤ��ꡤa-b��a����b�ޤǤ��ϰϤ���Ƭ��^��ʸ���������(�� + �ޤ�Ƥʤ���Τ����)���̣���롥����ʸ������ѹ����뤳�Ȥ��� + �դ��뤳�ȡ� downcase - ʸ������Υ���ե��٥åȤ����ƾ�ʸ�����֤�������ʸ������֤�. + ʸ������Υ���ե��٥åȤ����ƾ�ʸ�����֤�������ʸ������֤��� each - ʸ����1�Ԥ����ɤ߹���Ǥ��륤�ƥ졼��. + ʸ����1�Ԥ����ɤ߹���Ǥ��륤�ƥ졼���� each_byte - ʸ����Τ��줾��ΥХ��ȤˤĤ��Ʒ����֤����ƥ졼��. + ʸ����Τ��줾��ΥХ��ȤˤĤ��Ʒ����֤����ƥ졼���� gsub(pattern, replace) - ʸ�������pattern�˥ޥå�������ʬ������replace���֤�������. - �ִ�ʸ����replace���&��\0�ϥޥå�����ʸ�����, \1..\9��n���� - �γ�̤����Ƥ��֤���������. + ʸ�������pattern�˥ޥå�������ʬ������replace���֤������롥 + �ִ�ʸ����replace���&��\0�ϥޥå�����ʸ����ˡ�\1..\9��n���� + �γ�̤����Ƥ��֤��������롥 hex - ʸ�����16�ʿ���ɽ��ʸ����Ȳ�ᤷ��, �������Ѵ�����. + ʸ�����16�ʿ���ɽ��ʸ����Ȳ�ᤷ�ơ��������Ѵ����롥 index(substr[, pos]) - substr���ǽ�˽и�������֤��֤�. pos��Ϳ����Ȥ��ΰ��֤��鸡 - ���Ϥ���. ���Ĥ���ʤ����ˤ�nil���֤�. + substr���ǽ�˽и�������֤��֤���pos��Ϳ����Ȥ��ΰ��֤��鸡 + ���Ϥ��롥���Ĥ���ʤ����ˤ�nil���֤��� intern - ʸ����˰�դ��б������������֤�. ʸ����ϥʥ�ʸ����ޤ�ǤϤ� - ��ʤ�. + ʸ����˰�դ��б������������֤���ʸ����ϥʥ�ʸ����ޤ�ǤϤ� + ��ʤ��� length size - ʸ�����Ĺ��(�Х��ȿ�)���֤�. + ʸ�����Ĺ��(�Х��ȿ�)���֤��� ljust(width) rjust(width) center(width) - ʸ����줾��, ���ͤ�, ���ͤ�, ���������width��ʸ���� - ���֤�. ʸ����Ĺ��width���Ĺ�����ϸ���ʸ������֤�, �ڤ�� - ��ʤ�. + ʸ����줾�졤���ͤᡤ���ͤᡤ���������width��ʸ���� + ���֤���ʸ����Ĺ��width���Ĺ�����ϸ���ʸ������֤����ڤ�� + ��ʤ��� next - self����end�ޤǡּ��Ρ�ʸ������֤�. ����ʸ����ȤϿ����Ͽ��� - �Ȥ���,��ʸ���ϱ�ʸ���Ȥ������ä�, ��夬��ν������Ԥʤ�줿 - ��ΤǤ���. + self����end�ޤǡּ��Ρ�ʸ������֤�������ʸ����ȤϿ����Ͽ��� + �Ȥ��ơ���ʸ���ϱ�ʸ���Ȥ������ä�����夬��ν������Ԥʤ�줿 + ��ΤǤ��롥 "aa".next => "ab" "99".next => "100" @@ -3033,62 +3056,62 @@ Methods: oct - ʸ�����8�ʿ���ɽ��ʸ����Ȳ�ᤷ��, �������Ѵ�����. 8�ʿ��� - �����/[0-7]+/�Ǥ���, ʸ�������Ƭ���餳�Υѥ�����˥ޥå����� - ��ʬ���������Ѵ�����. ����������������ƤϤޤ�ʤ�ʸ������Ф� - �Ƥ�0���֤�. perl�Ȥϰ�ä�ʸ����0x����ϤޤäƤ��뤫��Ȥ��� - �� 16�ʿ����ȸ��ʤ��Ƥ��줿��Ϥ��ʤ�. ��������Ƭ��0��8�ʿ� - ��ǧ������, 0���֤�. + ʸ�����8�ʿ���ɽ��ʸ����Ȳ�ᤷ�ơ��������Ѵ����롥8�ʿ��� + �����/[0-7]+/�Ǥ��ꡤʸ�������Ƭ���餳�Υѥ�����˥ޥå����� + ��ʬ���������Ѵ����롥����������������ƤϤޤ�ʤ�ʸ������Ф� + �Ƥ�0���֤���perl�Ȥϰ�ä�ʸ����0x����ϤޤäƤ��뤫��Ȥ��� + �� 16�ʿ����ȸ��ʤ��Ƥ��줿��Ϥ��ʤ�����������Ƭ��0��8�ʿ� + ��ǧ�����졤0���֤��� reverse - ʸ����γƥХ��Ȥ�ս���¤٤�ʸ������֤�. ʸ����2�Х��Ȥ� - ���������ʸ����ޤ�Ǥ��Ƥ⤪�����ʤ��˥Х���ñ�̤�ȿž����. - split��2�Х���ʸ��������Τ�, 2�Х���ʸ����ޤ�ʸ�����ʸ + ʸ����γƥХ��Ȥ�ս���¤٤�ʸ������֤���ʸ����2�Х��Ȥ� + ���������ʸ����ޤ�Ǥ��Ƥ⤪�����ʤ��˥Х���ñ�̤�ȿž���롥 + split��2�Х���ʸ��������Τǡ�2�Х���ʸ����ޤ�ʸ�����ʸ ��ñ�̤�ȿž����ˤ� "����ʸ����".split(//).reverse.join("") - �Ȥ���Ф褤. + �Ȥ���Ф褤�� rindex(substr[, pos]) - ʸ����substr���Ǹ�˽и�������֤��֤�. pos��Ϳ����Ȥ��ΰ��� - �Ǹ�����λ����. ���Ĥ���ʤ����ˤ�nil���֤�. index�Ȥ������ - ��1)ʸ������������鸡������. 2)substr�Ȥ�������ɽ��������դ� - �ʤ�. ��2���Ǥ���. + ʸ����substr���Ǹ�˽и�������֤��֤���pos��Ϳ����Ȥ��ΰ��� + �Ǹ�����λ���롥���Ĥ���ʤ����ˤ�nil���֤���index�Ȥ������ + ��1)ʸ������������鸡�����롥2)substr�Ȥ�������ɽ��������դ� + �ʤ�����2���Ǥ��롥 split([sep[, limit]]) - ʸ�����sep�ǻ��ꤵ�줿�ѥ�����ˤ�ä�, �ե�����ɤ�ʬ�䤹��. + ʸ�����sep�ǻ��ꤵ�줿�ѥ�����ˤ�äơ��ե�����ɤ�ʬ�䤹�롥 sep����ά���줿���Υǥե���Ȥϥ����ƥ��ѿ�`$;'���ͤ��Ѥ���� - ��. limit�����ꤵ�줿���ˤϺ���limit�ĤΥե�����ɤ�ʬ�䤹��. - split()��ʬ�䤵�줿ʸ�����ޤ�������֤�. sep�ǻ��ꤵ�줿�ѥ��� - ��ʸ����ȥޥå��������ʸ����1ʸ�����Ĥ�ʬ�䤵���. + �롥limit�����ꤵ�줿���ˤϺ���limit�ĤΥե�����ɤ�ʬ�䤹�롥 + split()��ʬ�䤵�줿ʸ�����ޤ�������֤���sep�ǻ��ꤵ�줿�ѥ��� + ��ʸ����ȥޥå��������ʸ����1ʸ�����Ĥ�ʬ�䤵��롥 squeeze([str]) - ʸ����Τ���, str�˴ޤޤ��ʸ����Ϣ³���Ƥ������, ��ʸ���˰� - �̤���. str����ά���줿���, ���٤Ƥ�ʸ�����оݤȤ���. ʸ���� - �λ����tr��Ʊ�ͤǤ���, `a-b'��a����b�ޤǤ��ϰϤ�, ��Ƭ��`^'�� - ʸ���������(�ޤޤ�Ƥʤ���Τ����)���̣����. ����ʸ������� - �����뤳�Ȥ����դ��뤳��. + ʸ����Τ�����str�˴ޤޤ��ʸ����Ϣ³���Ƥ�����硤��ʸ���˰� + �̤��롥str����ά���줿��硤���٤Ƥ�ʸ�����оݤȤ��롥ʸ���� + �λ����tr��Ʊ�ͤǤ��ꡤ`a-b'��a����b�ޤǤ��ϰϤ���Ƭ��`^'�� + ʸ���������(�ޤޤ�Ƥʤ���Τ����)���̣���롥����ʸ������� + �����뤳�Ȥ����դ��뤳�ȡ� strip - ʸ���������ζ���������. + ʸ���������ζ����������� sub(pattern, replace) - ʸ�������pattern�˥ޥå�������ʬ��replace���֤�������. �ִ�ʸ - ����replace���&��\0�ϥޥå�����ʸ�����, \1..\9�� n���ܤγ�� - �����Ƥ��֤���������. sub()��gsub()�Ȱۤʤ�, �ǽ�Υޥå��� - �����ִ�����. + ʸ�������pattern�˥ޥå�������ʬ��replace���֤������롥�ִ�ʸ + ����replace���&��\0�ϥޥå�����ʸ����ˡ�\1..\9�� n���ܤγ�� + �����Ƥ��֤��������롥sub()��gsub()�Ȱۤʤꡤ�ǽ�Υޥå��� + �����ִ����롥 sum([bits]) - ʸ�����bits�ӥåȤΥ����å����������. ��ά�ͤ�16�Ǥ���. ruby - �Ǥϰʲ��Υ����ɤ�System V��`sum'�ץ�������Ʊ���ͤ�������. + ʸ�����bits�ӥåȤΥ����å���������롥��ά�ͤ�16�Ǥ��롥ruby + �Ǥϰʲ��Υ����ɤ�System V��`sum'�ץ�������Ʊ���ͤ������롥 while gets() sum += $_.sum @@ -3097,53 +3120,53 @@ Methods: swapcase - ʸ������Υ���ե��٥åȤΤ�����ʸ����ʸ����, ��ʸ������ʸ�� - ���֤�������. + ʸ������Υ���ե��٥åȤΤ�����ʸ����ʸ���ˡ���ʸ������ʸ�� + ���֤������롥 to_f - ʸ�����Float���Ѵ�����. + ʸ�����Float���Ѵ����롥 to_i - ʸ�����10�ʿ���ɽ��ʸ����Ȳ�ᤷ��, �������Ѵ�����. + ʸ�����10�ʿ���ɽ��ʸ����Ȳ�ᤷ�ơ��������Ѵ����롥 toupper - ʸ������Υ���ե��٥åȤ�������ʸ�����֤�������ʸ������֤�. - tr("a-z", "A-Z")��꾯��®��. + ʸ������Υ���ե��٥åȤ�������ʸ�����֤�������ʸ������֤��� + tr("a-z", "A-Z")��꾯��®���� tolower - ʸ������Υ���ե��٥åȤ����ƾ�ʸ�����֤�������ʸ������֤�. - tr("A-Z", "a-z")��꾯��®��. + ʸ������Υ���ե��٥åȤ����ƾ�ʸ�����֤�������ʸ������֤��� + tr("A-Z", "a-z")��꾯��®���� tr(search, replace) - ʸ��������searchʸ����˴ޤޤ��ʸ����¸�ߤ����, replaceʸ - ������б�����ʸ�����֤�������. replaceʸ����ά���줿��� - �϶�ʸ����Ϳ����줿�ȸ��ʤ�. replaceʸ����searchʸ����� + ʸ��������searchʸ����˴ޤޤ��ʸ����¸�ߤ���С�replaceʸ + ������б�����ʸ�����֤������롥replaceʸ����ά���줿��� + �϶�ʸ����Ϳ����줿�ȸ��ʤ���replaceʸ����searchʸ����� ���û������replaceʸ����κǸ��ʸ���������֤���Ƥ���ȸ��� - ��. searchʸ���������û�����ˤ��б�����ʸ���Τʤ�replace���� - ñ��̵�뤵���(BSD��tr��ư��). + ����searchʸ���������û�����ˤ��б�����ʸ���Τʤ�replace���� + ñ��̵�뤵���(BSD��tr��ư��)�� - searchʸ����, replaceʸ�������`a-b'�Ȥ������������줿���, �� - ��a����b�ޤǤ��ϰϤ�ʸ����ASCII�ξ���ǻ��ꤷ�����Ȥˤʤ�. �� - ��, searchʸ����κǽ��ʸ����`^'�Ǥ�����, ³��ʸ�����*�ޤ� - ��ʤ�*ʸ�����ִ����оݤˤʤ�. + searchʸ����replaceʸ�������`a-b'�Ȥ������������줿��硤�� + ��a����b�ޤǤ��ϰϤ�ʸ����ASCII�ξ���ǻ��ꤷ�����Ȥˤʤ롥�� + ����searchʸ����κǽ��ʸ����`^'�Ǥ����硤³��ʸ�����*�ޤ� + ��ʤ�*ʸ�����ִ����оݤˤʤ롥 - tr(1)�ε�ǽ�Τ���, ʸ���������뵡ǽ, Ϣ³����ʸ���̤��� - ��ǽ���̤Υ�åɤ�ʬ�䤵��Ƥ���. �����ε�ǽ�ˤĤ��Ƥ� - delete, squeeze�ȤΤ���. + tr(1)�ε�ǽ�Τ�����ʸ���������뵡ǽ��Ϣ³����ʸ���̤��� + ��ǽ���̤Υ�åɤ�ʬ�䤵��Ƥ��롥�����ε�ǽ�ˤĤ��Ƥ� + delete��squeeze�ȤΤ��ȡ� - ���ؤΤ���, str.tr(src,repl).squeeze(repl)�����������å� - tr_s(src,repl) ������Ƥ���. + ���ؤΤ��ᡤstr.tr(src,repl).squeeze(repl)�����������å� + tr_s(src,repl) ������Ƥ��롥 unpack(template) - ʸ�����templateʸ����ˤ������äƥ���ѥå���, ���������Ǥ� - �ޤ�������֤�. templateʸ�����Array���饹��pack��åɤȤ� - ��Ʊ�ͤǤ���. + ʸ�����templateʸ����ˤ������äƥ���ѥå��������������Ǥ� + �ޤ�������֤���templateʸ�����Array���饹��pack��åɤȤ� + ��Ʊ�ͤǤ��롥 a ASCIIʸ����(��³����nullʸ���䥹�ڡ�����Ĥ�) A ASCIIʸ����(��³����nullʸ���䥹�ڡ�������) @@ -3168,78 +3191,78 @@ Methods: @ ���а��֤ؤΰ�ư ruby��unpack��perl�Ȱ�äƥ����å�����η���ǽ���ʤ����Ȥ��� - �դ��뤳��. + �դ��뤳�ȡ� upcase - ʸ������Υ���ե��٥åȤ�������ʸ�����֤�������ʸ������֤�. + ʸ������Υ���ե��٥åȤ�������ʸ�����֤�������ʸ������֤��� upto(end) - self����Ϥޤä�, end�ޤǡּ��Ρ�ʸ�������Ϳ���륤�ƥ졼��. - ����ʸ����Ȥ�str.next��Ϳ������ʸ����Ǥ���. + self����Ϥޤäơ�end�ޤǡּ��Ρ�ʸ�������Ϳ���륤�ƥ졼���� + ����ʸ����Ȥ�str.next��Ϳ������ʸ����Ǥ��롥 - ���Υ�åɤ�Range:each���Ѥ����Ƥ���Τ�, �ʲ��Τ褦�ʽ��� - ����ǽ�Ǥ���. + ���Υ�åɤ�Range:each���Ѥ����Ƥ���Τǡ��ʲ��Τ褦�ʽ��� + ����ǽ�Ǥ��롥 for i in "a" .. "ba" print(i, "\n"); end - �����a, b, c, .. aa, .. az, ba�ޤǤ�ƹԤ˽��Ϥ���. + �����a, b, c, .. aa, .. az, ba�ޤǤ�ƹԤ˽��Ϥ��롥 - �����դ��ʤ���Ф����ʤ��Τ�, ���ν�λȽ����羮�ط��ǤϤʤ� - `=='��Ƚ�ꤵ��Ƥ��뤿��, `..'�黻�Ҥκ��դ��ͤ�³��ʸ����˱� - �դ�ʸ���ޤޤ�Ƥ��ʤ�, �ʲ�����Τ褦�ʾ���̵�¥롼�פ� - �٤äƤ��ޤ�. + �����դ��ʤ���Ф����ʤ��Τϡ����ν�λȽ����羮�ط��ǤϤʤ� + `=='��Ƚ�ꤵ��Ƥ��뤿�ᡤ`..'�黻�Ҥκ��դ��ͤ�³��ʸ����˱� + �դ�ʸ���ޤޤ�Ƥ��ʤ����ʲ�����Τ褦�ʾ���̵�¥롼�פ� + �٤äƤ��ޤ��� for i in "0" .. "1a" print(i, "\n"); end ��ԤϤ������Ȥˤ�ä���Ǥ��ƨ��Ƥ褦�Ȥ��Ƥ���ȹͤ���� - �⤤�뤫�⤷��ʤ�. ���ο�¬��������. + �⤤�뤫�⤷��ʤ������ο�¬���������� Single Methods: new(string) - string��Ʊ�����Ƥ���Ŀ�����ʸ������֤�. + string��Ʊ�����Ƥ���Ŀ�����ʸ������֤��� *** Struct(���饹) -��¤�Υ��饹. ʣ���Υǡ�����ޤȤ������Ѥ�����(��: Time::times). -�ǡ�����ޤȤ����ˤ����饹���Ѥ����뤳�Ȥ⤢�뤬(��: select), -��¤�Τ�Ȥ��٤����ϰʲ��Τ褦�ʾ��Ǥ���. +��¤�Υ��饹��ʣ���Υǡ�����ޤȤ������Ѥ�����(��: Time::times)�� +�ǡ�����ޤȤ����ˤ����饹���Ѥ����뤳�Ȥ⤢�뤬(��: select)�� +��¤�Τ�Ȥ��٤����ϰʲ��Τ褦�ʾ��Ǥ��롥 (1) ���Ǥο������� - ���Ǥο�����ư�����ΤϹ�¤�Τ�Ȥ��Τˤϸ����ʤ�. + ���Ǥο�����ư�����ΤϹ�¤�Τ�Ȥ��Τˤϸ����ʤ��� (2) ���Ǥο���¿�� - �ʹ֤����٤��ưפ˰����복ǰ�ο���7�ĤޤǤǤ���Ȥ������⤬����. - ���β���˽�����, ���Ǥ�4�İʾ夢��ǡ����ξ���������Ѥ����� - ��, ���ǿ�*2(�Ĥޤꥪ�ե��åȤȤ��ΰ�̣)��7��ۤ���. ��ä�, �� - �Τ褦�ʾ��ˤϹ�¤�Τ�Ȥä��������䤹���Ȼפ���. + �ʹ֤����٤��ưפ˰����복ǰ�ο���7�ĤޤǤǤ���Ȥ������⤬���롥 + ���β���˽����С����Ǥ�4�İʾ夢��ǡ����ξ���������Ѥ����� + �硤���ǿ�*2(�Ĥޤꥪ�ե��åȤȤ��ΰ�̣)��7��ۤ��롥��äơ��� + �Τ褦�ʾ��ˤϹ�¤�Τ�Ȥä��������䤹���Ȼפ��롥 (3) Ʊ�������̤���������ʤ� - ��¤�Τ��������㴳���������Ȥ��⤤�Τ�, ®�٤�����ˤʤ��� + ��¤�Τ��������㴳���������Ȥ��⤤�Τǡ�®�٤�����ˤʤ��� (�㤨��Ʊ�������̤������������ʤ�)�Ϲ�¤�Τλ��Ѥ�Ŭ�ڤǤʤ� - ��ǽ��������. + ��ǽ�������롥 -�ƹ�¤�Τˤϥ���̾��Ʊ̾�ΰ����Τʤ���åɤ���������. +�ƹ�¤�Τˤϥ���̾��Ʊ̾�ΰ����Τʤ���åɤ��������롥 -�ܥɥ���������, ��¤�Τ�ɽ�����뤿��ˤϰʲ��η�����Ȥ�. +�ܥɥ��������ǡ���¤�Τ�ɽ�����뤿��ˤϰʲ��η�����Ȥ��� struct ��¤��̾ - ���� ... + ���� ..�� end -������, �ץ��������Ǥ��η����ǹ�¤�Τ���������櫓�ǤϤʤ�. +���������ץ��������Ǥ��η����ǹ�¤�Τ���������櫓�ǤϤʤ��� SuperClass: Object @@ -3249,33 +3272,33 @@ Methods: self[idx] - idx�����λ���idx���ܤ����Ǥ��֤�. idx��ʸ����λ���idx��Ʊ��̾ - ���Υ��Ф����Ǥ��֤�. + idx�����λ���idx���ܤ����Ǥ��֤���idx��ʸ����λ���idx��Ʊ��̾ + ���Υ��Ф����Ǥ��֤��� values - ��¤�ΤΥ��Ф��ͤ����Ǥ˻���������֤�. �㤨�аʲ��Υ����ɤ� - ��ʬ��passwd����ȥ����Ϥ��뤳�Ȥ��Ǥ���. + ��¤�ΤΥ��Ф��ͤ����Ǥ˻���������֤����㤨�аʲ��Υ����ɤ� + ��ʬ��passwd����ȥ����Ϥ��뤳�Ȥ��Ǥ��롥 print(Etc.getpwuid().values.join(":"), "\n") ���ν��Ϥ�`grep "$USER" /etc/passwd'�ν��Ϥ�;ʬ�ʥե�����ɤ� - ���Ĥ�(�����ƥ�ˤ�äưۤʤ�)������ʳ���Ʊ���Ǥ���. + ���Ĥ�(�����ƥ�ˤ�äưۤʤ�)������ʳ���Ʊ���Ǥ��롥 Single Methods: new(name, member::value...) - name�Ȥ���̾������Ĺ�¤�Τ���������. member�Ϲ�¤�ΤΥ��Ф� - ɽ��ʸ����Ǥ���, value�Ϥ����ͤǤ���. �������줿��¤�Τϥ�� - �Фǻ��ꤵ�줿̾�����ðۥ�åɤ��������Ƥ���, ���Υ�å� - �ˤ�äƥ��Ф����Ƥ����뤳�Ȥ��Ǥ���. + name�Ȥ���̾������Ĺ�¤�Τ��������롥member�Ϲ�¤�ΤΥ��Ф� + ɽ��ʸ����Ǥ��ꡤvalue�Ϥ����ͤǤ��롥�������줿��¤�Τϥ�� + �Фǻ��ꤵ�줿̾�����ðۥ�åɤ��������Ƥ��ơ����Υ�å� + �ˤ�äƥ��Ф����Ƥ����뤳�Ȥ��Ǥ��롥 *** TCPserver(���饹) -TCP/IP���ȥ���³�Υ�����¦�Υ����åȤΥ��饹. ���Υ��饹�ˤ�ä� -��ñ�˥����åȤ����Ѥ��������ФΥץ�����ߥ��Ǥ���. �㤨��echo���� -�Фϰʲ��Τ褦�ˤʤ�. +TCP/IP���ȥ���³�Υ�����¦�Υ����åȤΥ��饹�����Υ��饹�ˤ�ä� +��ñ�˥����åȤ����Ѥ��������ФΥץ�����ߥ��Ǥ��롥�㤨��echo���� +�Фϰʲ��Τ褦�ˤʤ롥 gs = TCPserver.open(4444) socks = [gs] @@ -3304,8 +3327,8 @@ Methods: accept - ���饤����Ȥ������³�������դ�, ��³����TCPsocket�Υ��� - �������֤�. + ���饤����Ȥ������³�������դ�����³����TCPsocket�Υ��� + �������֤��� Single Methods: @@ -3313,16 +3336,16 @@ Single Methods: open([host, ]service) service��/etc/services(�ޤ���NIS)����Ͽ����Ƥ��륵���ӥ�̾�� - �ݡ����ֹ�ǻ��ꤹ��. host����ꤷ�����ϻ��ꤷ���ۥ��Ȥ������ - ³����������դ���. ��ά�������ƤΥۥ��Ȥ������³�������� - ����. + �ݡ����ֹ�ǻ��ꤹ�롥host����ꤷ�����ϻ��ꤷ���ۥ��Ȥ������ + ³����������դ��롥��ά�������ƤΥۥ��Ȥ������³�������� + ���롥 *** TCPsocket -�����ͥåȥɥᥤ��Υ��ȥ������åȤΥ��饹. �̾��IO���饹�� -���֥��饹��Ʊ�ͤ������Ϥ��Ǥ���. ���Υ��饹�ˤ�äƥ����åȤ��Ѥ����� -�饤����Ȥ��ñ�˵��ҤǤ���. �桼�������ϤΤޤޥ����Ф�ž������� -�������ϰʲ��Τ褦�ˤʤ�. +�����ͥåȥɥᥤ��Υ��ȥ������åȤΥ��饹���̾��IO���饹�� +���֥��饹��Ʊ�ͤ������Ϥ��Ǥ��롥���Υ��饹�ˤ�äƥ����åȤ��Ѥ����� +�饤����Ȥ��ñ�˵��ҤǤ��롥�桼�������ϤΤޤޥ����Ф�ž������� +�������ϰʲ��Τ褦�ˤʤ롥 s = TCPsocket("localhost", 4444) while gets() @@ -3336,14 +3359,14 @@ Methods: addr - �����åȤ���³�����ɽ��������֤�. ��������γ����Ǥ���1���� - ��ʸ���� "AF_INET", ��2���Ǥ�port�ֹ�, ��3���Ǥ��ۥ��Ȥ�ɽ��ʸ - ����Ǥ���. + �����åȤ���³�����ɽ��������֤�����������γ����Ǥ���1���� + ��ʸ���� "AF_INET"����2���Ǥ�port�ֹ桤��3���Ǥ��ۥ��Ȥ�ɽ��ʸ + ����Ǥ��롥 peeraddr - ��³����襽���åȤξ����ɽ��������֤�. ��������γ����Ǥ� - addr��åɤ��֤������Ʊ���Ǥ���. + ��³����襽���åȤξ����ɽ��������֤�����������γ����Ǥ� + addr��åɤ��֤������Ʊ���Ǥ��롥 Single Methods: @@ -3351,15 +3374,15 @@ Single Methods: new(host, service) host�ǻ��ꤷ���ۥ��Ȥ�service�ǻ��ꤷ���ݡ��Ȥ���³���������� - �Ȥ��֤�. host�ϥۥ���̾, �ޤ��ϥ����ͥåȥ��ɥ쥹��ʸ - ����, service��/etc/services(�ޤ���NIS)����Ͽ����Ƥ��륵���� - ��̾���ݡ����ֹ�Ǥ���. + �Ȥ��֤���host�ϥۥ���̾���ޤ��ϥ����ͥåȥ��ɥ쥹��ʸ + ����service��/etc/services(�ޤ���NIS)����Ͽ����Ƥ��륵���� + ��̾���ݡ����ֹ�Ǥ��롥 *** Time(���饹) -���֤�ɽ�����饹. �羮��Ӥʤɤ��Ǥ���. Time.now�Ǹ��ߤλ��֤����뤳�� -���Ǥ���. �ޤ��ե�����Υ����ॹ����פ������åɤ�����ͤ⤳�Υ��� -���Υ����Ǥ���. +���֤�ɽ�����饹���羮��Ӥʤɤ��Ǥ��롥Time.now�Ǹ��ߤλ��֤����뤳�� +���Ǥ��롥�ޤ��ե�����Υ����ॹ����פ������åɤ�����ͤ⤳�Υ��� +���Υ����Ǥ��롥 SuperClass: Object @@ -3369,38 +3392,38 @@ Methods: self <=> other - other��Time�Υ���������. ������Ϳ����줿�� + other��Time�Υ�����������������Ϳ����줿�� ��ˤ�1970ǯ 1�� 1�� 00:00:00 GMT������ÿ��Ǥ���� - ���ƻ���Ȥ���Ӥ�Ԥʤ�. + ���ƻ���Ȥ���Ӥ�Ԥʤ��� asctime ctime to_s - �����date(1)������ʸ������Ѵ�����. + �����date(1)������ʸ������Ѵ����롥 gmtime - �����ॾ����ν�����Ԥʤ�ʤ�GMT�Ǥλ��������. ���Υ�å� - ������Ȥä�Time���饹�Υ�����, �ʸ�λ����Ѵ���GMT�� - �Ԥʤ�. gmtime�ϼ�ʬ���Ȥ��֤�. + �����ॾ����ν�����Ԥʤ�ʤ�GMT�Ǥλ�������롥���Υ�å� + ������Ȥä�Time���饹�Υ����ϡ��ʸ�λ����Ѵ���GMT�� + �Ԥʤ���gmtime�ϼ�ʬ���Ȥ��֤��� ����ɥ�λ����ɽ������ˤ� print(Time.now.gmtime, "\n") - �Ȥ���Ф褤. + �Ȥ���Ф褤�� localtime - �����ॾ����ν�����Ԥʤä����������(�ǥե����). localtime - �ϼ�ʬ���Ȥ��֤�. + �����ॾ����ν�����Ԥʤä����������(�ǥե����)��localtime + �ϼ�ʬ���Ȥ��֤��� to_i tv_sec - 1970ǯ 1�� 1�� 00:00:00 GMT�������ޤǤ��ÿ����������֤�. �� - ���second����ʬ�Ǥ⤢��. + 1970ǯ 1�� 1�� 00:00:00 GMT�������ޤǤ��ÿ����������֤����� + ���second����ʬ�Ǥ⤢�롥 sec min @@ -3412,13 +3435,13 @@ Methods: zone isdst - ����Ū���ݻ����Ƥ���tm��¤�Τ����Ƥ��֤�. zone�ʳ����������֤�. - zone�ϥ����ॾ�����ɽ��ʸ������֤�. (cf localtime(3)) + ����Ū���ݻ����Ƥ���tm��¤�Τ����Ƥ��֤���zone�ʳ����������֤��� + zone�ϥ����ॾ�����ɽ��ʸ������֤���(cf localtime(3)) strftime(format) - �����formatʸ����˽��ä�ʸ������Ѵ�������̤��֤�. format - ʸ����Ȥ��ƻ���Ǥ����Τ� �ʲ����̤�Ǥ���. + �����formatʸ����˽��ä�ʸ������Ѵ�������̤��֤���format + ʸ����Ȥ��ƻ���Ǥ����Τ� �ʲ����̤�Ǥ��롥 %A ������̾��(Sunday, Monday,...) %a �����ξ�ά̾(Sun, Mon,...) @@ -3433,11 +3456,11 @@ Methods: %m ���ɽ������(01-12) %p �����ޤ��ϸ��(AM,PM) %S ��(00-61) - %U ����ɽ������. �ǽ������������1���� + %U ����ɽ���������ǽ������������1���� �Ϥޤ�(00-53) - %W ����ɽ������. �ǽ�η���������1���� + %W ����ɽ���������ǽ�η���������1���� �Ϥޤ�(00-53) - %w ������ɽ������. ��������0(0-6) + %w ������ɽ����������������0(0-6) %X ����(��: 15:01:06) %x ����(��: Fri Jan 14 1994) %Y �����ɽ������ @@ -3448,25 +3471,25 @@ Methods: usec tv_usec - �����micro second����ʬ���֤�. + �����micro second����ʬ���֤��� Single Methods: now - ���ߤλ����ɽ��Time���饹�Υ�������������. + ���ߤλ����ɽ��Time���饹�Υ������������롥 at(time) - time��Ʊ�������ɽ��Time���饹�Υ�������������. time�� - Time���饹�Υ��������뤤�Ͽ�(����/��ư��������)�Ǥ���, + time��Ʊ�������ɽ��Time���饹�Υ������������롥time�� + Time���饹�Υ��������뤤�Ͽ�(����/��ư��������)�Ǥ��ꡤ ���ξ���1970ǯ 1�� 1�� 00:00:00 GMT������ÿ��Ǥ���Ȥ��ƻ� - ��������. + �������롥 times ���ߤΥץ������Ȥ��λҥץ������������桼��/�����ƥ�CPU���� - ����ѻ���¤�ΤȤ����֤�(Struct��). + ����ѻ���¤�ΤȤ����֤�(Struct��)�� struct tms utime # �ץ������Υ桼������ @@ -3475,12 +3498,12 @@ Single Methods: cstime # �ҥץ������Υ����ƥ���� end - ���֤�ñ�̤��äǤ���, ��ư����������Ϳ������. �ܺ٤� - times(3)�ȤΤ���. + ���֤�ñ�̤��äǤ��ꡤ��ư����������Ϳ�����롥�ܺ٤� + times(3)�ȤΤ��ȡ� *** UNIXserver -UNIX���ȥ���³�Υ�����¦�Υ����åȤΥ��饹. +UNIX���ȥ���³�Υ�����¦�Υ����åȤΥ��饹�� SuperClass: UNIXsocket @@ -3488,13 +3511,13 @@ Methods: accept - ���饤����Ȥ������³�������դ�, ��³����UNIXsocket�Υ��� - �������֤�. + ���饤����Ȥ������³�������դ�����³����UNIXsocket�Υ��� + �������֤��� *** UNIXsocket -UNIX�ɥᥤ��Υ��ȥ������åȤΥ��饹. �̾��IO���饹�Υ��֥��饹 -��Ʊ�ͤ������Ϥ��Ǥ���. +UNIX�ɥᥤ��Υ��ȥ������åȤΥ��饹���̾��IO���饹�Υ��֥��饹 +��Ʊ�ͤ������Ϥ��Ǥ��롥 SuperClass: BasicSocket @@ -3502,24 +3525,24 @@ Methods: addr - �����åȤ���³�����ɽ��������֤�. ��������γ����Ǥ���1���� - ��ʸ���� "AF_UNIX", ��2���Ǥ�path�Ǥ���. + �����åȤ���³�����ɽ��������֤�����������γ����Ǥ���1���� + ��ʸ���� "AF_UNIX"����2���Ǥ�path�Ǥ��롥 path - UNIX�����åȤΥѥ����֤�. + UNIX�����åȤΥѥ����֤��� peeraddr - ��³����襽���åȤξ����ɽ��������֤�. ��������γ����Ǥ� - addr��åɤ��֤������Ʊ���Ǥ���. + ��³����襽���åȤξ����ɽ��������֤�����������γ����Ǥ� + addr��åɤ��֤������Ʊ���Ǥ��롥 Single Methods: open(path) new(path) - path�ǻ��ꤷ���ѥ�̾���Ѥ�����³���������åȤ��֤�. + path�ǻ��ꤷ���ѥ�̾���Ѥ�����³���������åȤ��֤��� ------------------------------------------------------- Local variables: @@ -3,7 +3,7 @@ sprintf.c - $Author: matz $ - $Date: 1994/10/14 06:19:50 $ + $Date: 1994/12/06 09:30:23 $ created at: Fri Oct 15 10:39:26 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -220,7 +220,7 @@ Fsprintf(argc, argv) val = str2inum(RSTRING(val)->ptr, 0); goto bin_retry; case T_BIGNUM: - val = Fbig_clone(val); + val = big_clone(val); break; default: WrongType(val, T_FIXNUM); @@ -280,7 +280,6 @@ Fsprintf(argc, argv) } sprintf(&buf[blen], fbuf, s); blen += strlen(&buf[blen]); - obj_free(val); } break; @@ -5,6 +5,7 @@ static char sccsid[] = "@(#) st.c 5.1 89/12/14 Crucible"; static char *rcsid = "$Header: /usr/ext/cvsroot/ruby/st.c,v 1.2 1994/08/12 04:47:59 matz Exp $"; #endif +#include "config.h" #include <stdio.h> #include "st.h" @@ -3,7 +3,7 @@ string.c - $Author: matz $ - $Date: 1994/11/18 01:37:38 $ + $Date: 1994/12/06 09:30:24 $ created at: Mon Aug 9 17:12:58 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -61,7 +61,7 @@ str_new3(str) #define as_str(str) (struct RString*)obj_as_string(str) -static ID pr_str = Qnil; +static ID pr_str; VALUE obj_as_string(obj) @@ -79,7 +79,7 @@ obj_as_string(obj) } VALUE -Fstr_clone(str) +str_clone(str) struct RString *str; { VALUE obj; @@ -93,7 +93,7 @@ Fstr_clone(str) } static VALUE -Fstr_new(class, str) +Sstr_new(class, str) VALUE class; struct RString *str; { @@ -164,7 +164,7 @@ Fstr_dot2(left, right) VALUE str; Check_Type(right, T_STRING); - str = range_new(C_Range, left, right); + str = range_new(left, right); return str; } @@ -375,6 +375,7 @@ Fstr_match(x, y) switch (TYPE(y)) { case T_REGEXP: return Freg_match(y, x); + case T_STRING: reg = re_regcomp(y); start = research(reg, x, 0, ignorecase); @@ -382,6 +383,7 @@ Fstr_match(x, y) return FALSE; } return INT2FIX(start); + default: if (obj_is_kind_of(y, C_Glob)) { return Fglob_match(y, x); @@ -542,7 +544,6 @@ Fstr_next(orig) str2 = (struct RString*)str_new(0, str->len+1); str2->ptr[0] = c; memmove(str2->ptr+1, str->ptr, str->len); - obj_free(str); str = str2; } @@ -1310,7 +1311,7 @@ Fstr_split(str, args) } else { if (isspace(*ptr)) { - Fary_push(result, str_substr(str, beg, end-beg)); + ary_push(result, str_substr(str, beg, end-beg)); if (limit && lim <= ++i) break; skip = 1; beg = end + 1; @@ -1324,7 +1325,7 @@ Fstr_split(str, args) else { for (end = beg = 0; ptr<eptr; ptr++) { if (*ptr == char_sep) { - Fary_push(result, str_substr(str, beg, end-beg)); + ary_push(result, str_substr(str, beg, end-beg)); if (limit && lim <= ++i) break; beg = end + 1; } @@ -1344,9 +1345,9 @@ Fstr_split(str, args) if (start == end && LMATCH[0] == RMATCH[0]) { if (last_null == 1) { if (ismbchar(str->ptr[beg])) - Fary_push(result, str_substr(str, beg, 2)); + ary_push(result, str_substr(str, beg, 2)); else - Fary_push(result, str_substr(str, beg, 1)); + ary_push(result, str_substr(str, beg, 1)); beg = start; if (limit && lim <= ++i) break; } @@ -1357,7 +1358,7 @@ Fstr_split(str, args) } } else { - Fary_push(result, str_substr(str, beg, end-beg)); + ary_push(result, str_substr(str, beg, end-beg)); beg = start = RMATCH[0]; if (limit && lim <= ++i) break; } @@ -1369,17 +1370,17 @@ Fstr_split(str, args) tmp = str_new(0, 0); else tmp = str_subseq(str, LMATCH[idx], RMATCH[idx]-1); - Fary_push(result, tmp); + ary_push(result, tmp); if (limit && lim <= ++i) break; } } } if (str->len > beg) { - Fary_push(result, str_subseq(str, beg, -1)); + ary_push(result, str_subseq(str, beg, -1)); } else if (str->len == beg) { - Fary_push(result, str_new(0, 0)); + ary_push(result, str_new(0, 0)); } return result; @@ -1631,8 +1632,8 @@ Init_String() C_String = rb_define_class("String", C_Object); rb_include_module(C_String, M_Comparable); rb_include_module(C_String, M_Enumerable); - rb_define_single_method(C_String, "new", Fstr_new, 1); - rb_define_method(C_String, "clone", Fstr_clone, 0); + rb_define_single_method(C_String, "new", Sstr_new, 1); + rb_define_method(C_String, "clone", str_clone, 0); rb_define_method(C_String, "<=>", Fstr_cmp, 1); rb_define_method(C_String, "==", Fstr_equal, 1); rb_define_method(C_String, "hash", Fstr_hash, 0); @@ -3,7 +3,7 @@ struct.c - $Author: matz $ - $Date: 1994/08/12 04:48:01 $ + $Date: 1994/12/06 09:30:26 $ created at: Tue Mar 22 18:44:30 JST 1994 ************************************************/ @@ -101,7 +101,7 @@ struct_new(name, va_alist) #define ASSOC_VAL(a) RARRAY(a)->ptr[1] static VALUE -Fstruct_new(class, args) +Sstruct_new(class, args) VALUE class, args; { VALUE name, st; @@ -151,7 +151,7 @@ Fstruct_values(s) t = s->tbl; tend = t + s->len; while (t < tend) { - Fary_push(ary, t->value); + ary_push(ary, t->value); t++; } @@ -223,7 +223,7 @@ Fstruct_to_a(s) ary = ary_new2(s->len); for (i=0; i<s->len; i++) { - Fary_push(ary, s->tbl[i].value); + ary_push(ary, s->tbl[i].value); } return ary; @@ -248,7 +248,7 @@ Init_Struct() C_Struct = rb_define_class("Struct", C_Object); rb_include_module(C_Struct, M_Enumerable); - rb_define_single_method(C_Struct, "new", Fstruct_new, -2); + rb_define_single_method(C_Struct, "new", Sstruct_new, -2); rb_define_method(C_Struct, "clone", Fstruct_clone, 0); rb_define_method(C_Struct, "to_s", Fstruct_to_s, 0); @@ -3,7 +3,7 @@ time.c - $Author: matz $ - $Date: 1994/11/01 08:28:40 $ + $Date: 1994/12/06 09:30:28 $ created at: Tue Dec 28 14:31:59 JST 1993 Copyright (C) 1994 Yukihiro Matsumoto @@ -38,7 +38,7 @@ static ID id_tv; } static VALUE -Ftime_now(class) +Stime_now(class) VALUE class; { VALUE obj = obj_alloc(class); @@ -116,7 +116,7 @@ time_timeval(time) } static VALUE -Ftime_at(class, time) +Stime_at(class, time) VALUE class, time; { VALUE obj; @@ -501,7 +501,7 @@ Ftime_strftime(time, format) } static VALUE -Ftime_times(obj) +Stime_times(obj) VALUE obj; { struct tms buf; @@ -520,11 +520,11 @@ Init_Time() C_Time = rb_define_class("Time", C_Object); rb_include_module(C_Time, M_Comparable); - rb_define_single_method(C_Time, "now", Ftime_now, 0); - rb_define_single_method(C_Time, "new", Ftime_now, 0); - rb_define_single_method(C_Time, "at", Ftime_at, 1); + rb_define_single_method(C_Time, "now", Stime_now, 0); + rb_define_single_method(C_Time, "new", Stime_now, 0); + rb_define_single_method(C_Time, "at", Stime_at, 1); - rb_define_single_method(C_Time, "times", Ftime_times, 0); + rb_define_single_method(C_Time, "times", Stime_times, 0); rb_define_method(C_Time, "to_i", Ftime_to_i, 0); rb_define_method(C_Time, "to_f", Ftime_to_f, 0); @@ -1,2 +1,2 @@ -#define RUBY_VERSION "0.56" -#define VERSION_DATE "94/11/22" +#define RUBY_VERSION "0.60" +#define VERSION_DATE "94/12/08" |