Skip to content

Commit 3a61037

Browse files
author
(no author)
committed
This commit was manufactured by cvs2svn to create tag
'v1_3_1_990127'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_3_1_990127@381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 62e648e commit 3a61037

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+5929
-15933
lines changed

.cvsignore

Lines changed: 0 additions & 17 deletions
This file was deleted.

ChangeLog

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
Wed Jan 27 03:16:18 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
2+
3+
* variable.c (rb_mod_const_at): can't list constants of the
4+
untainted objects in safe mode.
5+
6+
* class.c (method_list): can't list methods of untainted objects
7+
in safe mode.
8+
9+
Tue Jan 26 02:40:41 1999 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
10+
11+
* prec.c: Precision support for numbers.
12+
13+
Thu Jan 21 19:08:14 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
14+
15+
* eval.c (rb_f_raise): calls `exception' method, not `new'.
16+
17+
* error.c (exc_exception): renamed from `new'.
18+
119
Wed Jan 20 03:39:48 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
220

321
* parse.y (yycompile): rb_in_compile renamed to ruby_in_compile.

MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ object.c
5050
pack.c
5151
parse.c
5252
parse.y
53+
prec.c
5354
process.c
5455
random.c
5556
range.c

Makefile.in

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ SHELL = /bin/sh
22

33
#### Start of system configuration section. ####
44

5+
MAJOR= @MAJOR@
6+
MINOR= @MINOR@
7+
TEENY= @TEENY@
8+
9+
RUBY_INSTALL_NAME=@RUBY_INSTALL_NAME@
10+
511
srcdir = @srcdir@
612
VPATH = @srcdir@:@srcdir@/missing
713

@@ -25,7 +31,9 @@ binsuffix = @binsuffix@
2531

2632
#### End of system configuration section. ####
2733

28-
34+
LIBRUBY_A = @LIBRUBY_A@
35+
LIBRUBY_SO = @LIBRUBY_SO@
36+
LIBRUBY_ALIASES= @LIBRUBY_ALIASES@
2937
LIBRUBY = @LIBRUBY@
3038
LIBRUBYARG = @LIBRUBYARG@
3139

@@ -50,6 +58,7 @@ OBJS = array.o \
5058
inits.o \
5159
io.o \
5260
marshal.o \
61+
prec.o \
5362
math.o \
5463
numeric.o \
5564
object.o \
@@ -75,25 +84,30 @@ OBJS = array.o \
7584
all: miniruby$(binsuffix) rbconfig.rb
7685
@./miniruby$(binsuffix) -Xext extmk.rb @EXTSTATIC@
7786

78-
miniruby$(binsuffix): libruby.a $(MAINOBJ) dmyext.o
87+
miniruby$(binsuffix): $(LIBRUBY_A) $(MAINOBJ) dmyext.o
7988
@rm -f $@
80-
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.o libruby.a $(LIBS) -o $@
89+
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) dmyext.o $(LIBRUBY_A) $(LIBS) -o $@
8190

8291
ruby$(binsuffix): $(LIBRUBY) $(MAINOBJ) $(EXTOBJS)
8392
@rm -f $@
8493
$(PURIFY) $(CC) $(LDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(LIBS) -o $@
8594

86-
libruby.a: $(OBJS) dmyext.o
95+
$(LIBRUBY_A): $(OBJS) dmyext.o
8796
@AR@ rcu $@ $(OBJS) dmyext.o
8897
@-@RANLIB@ $@ 2> /dev/null || true
8998

90-
libruby.so: $(OBJS) dmyext.o
99+
$(LIBRUBY_SO): $(OBJS) dmyext.o
91100
$(LDSHARED) $(DLDFLAGS) $(SOLIBS) $(OBJS) dmyext.o -o $@
101+
@for alias in $(LIBRUBY_ALIASES); do \
102+
rm -f $$alias \
103+
&& @LN_S@ $(LIBRUBY_SO) $$alias \
104+
&& echo ln @LN_S@ $(LIBRUBY_SO) $$alias; \
105+
done
92106

93107
install: rbconfig.rb
94108
./miniruby$(binsuffix) $(srcdir)/instruby.rb $(DESTDIR)
95109

96-
clean:; @rm -f $(OBJS) $(LIBRUBY) $(MAINOBJ) rbconfig.rb
110+
clean:; @rm -f $(OBJS) $(LIBRUBY_A) $(LIBRUBY_SO) $(LIBRUBY_ALIASES) $(MAINOBJ) rbconfig.rb
97111
@rm -f ext/extinit.c ext/extinit.o dmyext.o
98112
@if test -f ./miniruby$(binsuffix); then \
99113
./miniruby$(binsuffix) -Xext extmk.rb clean; \
@@ -208,6 +222,7 @@ inits.o: inits.c ruby.h config.h defines.h intern.h
208222
io.o: io.c ruby.h config.h defines.h intern.h rubyio.h rubysig.h
209223
main.o: main.c ruby.h config.h defines.h intern.h
210224
marshal.o: marshal.c ruby.h config.h defines.h intern.h rubyio.h st.h
225+
prec.o: prec.c ruby.h config.h defines.h intern.h
211226
math.o: math.c ruby.h config.h defines.h intern.h
212227
numeric.o: numeric.c ruby.h config.h defines.h intern.h
213228
object.o: object.c ruby.h config.h defines.h intern.h st.h

README.EXT

Lines changed: 45 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,11 @@ FIXNUM
133133
����VALUE���Ѵ�����ޥ����ϰʲ��Τ�Τ�����ޤ���ɬ�פ˱���
134134
�ƻȤ�ʬ���Ƥ���������
135135

136-
INT2FIX() ��Ȥ�������31bit����˼��ޤ��
137-
INT2NUM() Ǥ�դ���������VALUE��
136+
INT2FIX() for intergers within 31bits.
137+
INT2NUM() for arbitrary sized integer.
138138

139-
INT2NUM()��������FIXNUM���ϰϤ˼��ޤ�ʤ���硤Bignum���Ѵ�
140-
���Ƥ���ޤ�(���������٤�)��
139+
INT2NUM() converts integers into Bignums, if it is out of FIXNUM
140+
range, but bit slower.
141141

142142
1.5 Manipulate Ruby data
143143

@@ -205,8 +205,6 @@ Ruby
205205
* Methods, Singleton Methods
206206
* Constants
207207

208-
�ǤϽ�˾Ҳ𤷤ޤ���
209-
210208
2.1.1 Class/module definition
211209

212210
To define class or module, use functions below:
@@ -643,23 +641,21 @@ extconf.rb
643641

644642
(6) prepare depend (optional)
645643

646-
�⤷���ǥ��쥯�ȥ��depend�Ȥ����ե����뤬¸�ߤ���С�
647-
Makefile����¸�ط�������å����Ƥ���ޤ���
644+
If the file named depend exists, Makefile will include that file to
645+
check dependency. You can make this file by invoking
648646

649647
% gcc -MM *.c > depend
650648

651-
�ʤɤǺ�뤳�Ȥ�����ޤ������ä�»��̵���Ǥ��礦��
649+
It's no harm. Prepare it.
652650

653651
(7) MANIFEST�ե�����˥ե�����̾�������
654652

655-
% ls > MANIFEST
653+
% find * -type f -print > MANIFEST
656654
% vi MANIFEST
657655

658-
*.o, *~�ʤ���ɬ�פʥե�����ʳ���MANIFEST���ɲä��Ƥ����ޤ���
659-
make���ˤ�MANIFEST�����Ƥϻ��Ȥ��ޤ���Τǡ����ΤޤޤǤ�����
660-
�ϵ����ޤ��󤬡��ѥå������󥰤λ��˻��Ȥ��뤳�Ȥ�����Τȡ�
661-
ɬ�פʥե��������̤Ǥ���Τǡ��Ѱդ��Ƥ����������ɤ��Ǥ���
662-
����
656+
Append file names into MANIFEST. The compilation scheme requires
657+
MANIFEST only to be exist. But, you'd better take this step to
658+
distinguish required files.
663659

664660
(8) make
665661

@@ -676,9 +672,9 @@ so that you can inspect the module by the debugger.
676672

677673
(10) done, now you have the extension library
678674

679-
��Ϥ��ä���Ȥ��ʤꡤ������������ʤꡤ���ʤꡤ����ͳ�ˤ�
680-
�Ȥ�����������Ruby�κ�Ԥϳ�ĥ�饤�֥��˴ؤ��ư��ڤθ�����
681-
��ĥ���ޤ���
675+
You can do anything you want with your library. The author of Ruby
676+
will not claim any restriction about your code depending Ruby API.
677+
Feel free to use, modify, distribute or sell your program.
682678

683679
Appendix A. Ruby�Υ����������ɤ�ʬ��
684680

@@ -737,7 +733,7 @@ class library
737733
struct.c
738734
time.c
739735

740-
Appendix B. ��ĥ�Ѵؿ���ե����
736+
Appendix B. Ruby extension API reference
741737

742738
C���줫��Ruby�ε�ǽ�����Ѥ���API�ϰʲ����̤�Ǥ��롥
743739

@@ -764,7 +760,7 @@ const: Qtrue object(default true value)
764760

765761
const: Qfalse object
766762

767-
** C�ǡ����Υ��ץ��벽
763+
** C pointer wrapping
768764

769765
Data_Wrap_Struct(VALUE class, void (*mark)(), void (*free)(), void *sval)
770766

@@ -783,33 +779,33 @@ type
783779

784780
data����type���Υݥ��󥿤���Ф��ѿ�sval����������ޥ�����
785781

786-
** ���饹/�⥸�塼�����
782+
** defining class/module
787783

788784
VALUE rb_define_class(char *name, VALUE super)
789785

790-
super�Υ��֥��饹�Ȥ��ƿ�����Ruby���饹��������롥
786+
Defines new Ruby class as subclass of super.
791787

792788
VALUE rb_define_class_under(VALUE module, char *name, VALUE super)
793789

794-
super�Υ��֥��饹�Ȥ��ƿ�����Ruby���饹���������module����
795-
���Ȥ���������롥
790+
Creates new Ruby class as subclass of super, under the module's
791+
namespace.
796792

797793
VALUE rb_define_module(char *name)
798794

799-
������Ruby�⥸�塼���������롥
795+
Defines new Ruby module.
800796

801797
VALUE rb_define_module_under(VALUE module, char *name, VALUE super)
802798

803-
������Ruby�⥸�塼����������module������Ȥ���������롥
799+
Defines new Ruby module, under the modules's namespace.
804800

805801
void rb_include_module(VALUE class, VALUE module)
806802

807-
�⥸�塼��򥤥󥯥롼�ɤ��롥class�����Ǥ�module�򥤥󥯥롼
808-
�ɤ��Ƥ�����ˤϲ��⤷�ʤ�(¿�ť��󥯥롼�ɤζػ�)��
803+
Includes module into class. If class already includes it, just
804+
ignore.
809805

810806
void rb_extend_object(VALUE object, VALUE module)
811807

812-
���֥������Ȥ�⥸�塼��(���������Ƥ���᥽�å�)�dz�ĥ���롥
808+
Extend the object with module's attribute.
813809

814810
** Defining Global Variables
815811

@@ -871,19 +867,20 @@ Defines global contant. This is just work as
871867

872868
rb_define_method(VALUE class, char *name, VALUE (*func)(), int argc)
873869

874-
�᥽�åɤ�������롥argc��self����������ο���argc��-1�λ�,
875-
�ؿ��ˤϰ����ο�(self��ޤޤʤ�)����1����, �������������2��
876-
���Ȥ��������Ϳ������(��3������self)��argc��-2�λ�, ��1��
877-
����self, ��2������args(args�ϰ�����ޤ�Ruby������)�Ȥ�����
878-
����Ϳ�����롥
870+
Defines a method for the class. func is the function pointer. argc
871+
is the number of arguments. if argc is -1, the function will receive
872+
3 arguments argc, argv, and self. if argc is -2, the function will
873+
receive 2 arguments, self and args, where args is the Ruby array of
874+
the method arguments.
879875

880876
rb_define_private_method(VALUE class, char *name, VALUE (*func)(), int argc)
881877

882-
private�᥽�åɤ�������롥������rb_define_method()��Ʊ����
878+
Defines a private method for the class. Arguments are same as
879+
rb_define_method().
883880

884881
rb_define_singleton_method(VALUE class, char *name, VALUE (*func)(), int argc)
885882

886-
�ðۥ᥽�åɤ�������롥������rb_define_method()��Ʊ����
883+
Defines a singleton method. Arguments are same as rb_define_method().
887884

888885
rb_scan_args(int atgc, VALUE *argv, char *fmt, ...)
889886

@@ -899,42 +896,40 @@ argc,argv
899896

900897
VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
901898

902-
�᥽�åɸƤӽФ���ʸ���󤫤�mid�����뤿��ˤ�rb_intern()��Ȥ���
899+
Invokes the method. To retrieve mid from method name, use rb_intern().
903900

904901
VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
905902

906-
�᥽�åɸƤӽФ���������argc,argv�������Ϥ���
903+
Invokes method, passing arguments by array of values.
907904

908905
VALUE rb_eval_string(char *str)
909906

910-
ʸ�����Ruby�ȥ�����ץȤ��ƥ���ѥ��롦�¹Ԥ��롥
907+
Compiles and executes the string as Ruby program.
911908

912909
ID rb_intern(char *name)
913910

914-
ʸ������б�����ID���֤���
911+
Returns ID corresponding the name.
915912

916913
char *rb_id2name(ID id)
917914

918-
ID���б�����ʸ������֤�(�ǥХå���)��
915+
Returns the name corresponding ID.
919916

920917
char *rb_class2name(VALUE class)
921918

922-
class��̾�����֤�(�ǥХå���)��class��̾��������ʤ����ˤ�,
923-
������̤ä�̾������ĥ��饹��̾�����֤���
919+
Returns the name of the class.
924920

925-
** ���󥹥����ѿ�
921+
** Instance Variables
926922

927923
VALUE rb_iv_get(VALUE obj, char *name)
928924

929-
obj�Υ��󥹥����ѿ����ͤ����롥`@'�ǻϤޤ�ʤ����󥹥���
930-
�ѿ��� Ruby�ץ�����फ�饢�������Ǥ��ʤ��ֱ��줿�ץ��󥹥�
931-
���ѿ��ˤʤ롥
925+
Retrieve the value of the instance variable. If the name is not
926+
prefixed by `@', that variable shall be inaccessible from Ruby.
932927

933928
VALUE rb_iv_set(VALUE obj, char *name, VALUE val)
934929

935-
obj�Υ��󥹥����ѿ���val�˥��åȤ��롥
930+
Sets the value of the instance variable.
936931

937-
** ���湽¤
932+
** Control Structure
938933

939934
VALUE rb_iterate(VALUE (*func1)(), void *arg1, VALUE (*func2)(), void *arg2)
940935

@@ -1024,6 +1019,6 @@ this method, the compilation will not be done.
10241019

10251020
/*
10261021
* Local variables:
1027-
* fill-column: 60
1022+
* fill-column: 70
10281023
* end:
10291024
*/

README.EXT.jp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ Makefile
723723

724724
(7) MANIFEST�ե�����˥ե�����̾�������
725725

726-
% ls > MANIFEST
726+
% find * -type f -print > MANIFEST
727727
% vi MANIFEST
728728

729729
*.o, *~�ʤ���ɬ�פʥե�����ʳ���MANIFEST���ɲä��Ƥ����ޤ���

ToDo

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Language Spec.
22

33
* package or access control for global variables
4-
* named arguments like foo(nation:="german").
4+
* named arguments like foo(nation:="german" or nation: "german").
5+
* method to retrieve argument information (need new C API)
56
* multiple return values, yield values. maybe imcompatible
7+
* cascading method invocation.
68

79
Hacking Interpreter
810

@@ -12,7 +14,6 @@ Hacking Interpreter
1214
* remove rb_eval() recursions
1315
* syntax tree -> bytecode ???
1416
* scrambled script, or script filter
15-
* regular expression bug /(?:\s+\d+){2}/ URGENT!!
1617

1718
Extension Libraries
1819

0 commit comments

Comments
 (0)