summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog27
-rw-r--r--README.EXT25
-rw-r--r--README.EXT.jp53
-rw-r--r--eval.c21
-rw-r--r--ext/Win32API/Win32API.c11
-rw-r--r--ext/curses/curses.c2
-rw-r--r--ext/dbm/dbm.c1
-rw-r--r--ext/extmk.rb.in6
-rw-r--r--ext/gdbm/gdbm.c1
-rw-r--r--ext/md5/md5init.c1
-rw-r--r--ext/socket/socket.c6
-rw-r--r--lib/cgi.rb5
-rw-r--r--lib/pstore.rb4
-rw-r--r--lib/weakref.rb2
-rw-r--r--misc/ruby-mode.el21
-rw-r--r--node.h3
-rw-r--r--ruby.h1
-rw-r--r--version.h4
18 files changed, 127 insertions, 67 deletions
diff --git a/ChangeLog b/ChangeLog
index e0c836c335..9aa1d4478c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+Mon Mar 6 12:28:37 2000 Yukihiro Matsumoto <[email protected]>
+
+ * ext/socket/socket.c (ip_addrsetup): should check length of hostname.
+
+ * ext/socket/socket.c (ip_addrsetup): check newline at the end of
+ hostname. These fixes suggested by Muvaw Pnazte <[email protected]>.
+
+Sun Mar 5 20:35:45 2000 WATANABE Hirofumi <[email protected]>
+
+ * ext/Win32API/Win32API.c (Win32API_initialize): should call
+ LoadLibrary() everytime and should assign the hdll to Win32API
+ object(protect the hdll from GC).
+
+Sun Mar 5 18:49:06 2000 Nakada.Nobuyoshi <[email protected]>
+
+ * misc/ruby-mode.el (ruby-parse-region): not treat method `begin'
+ and `end' as reserved words.
+
+ * misc/ruby-mode.el (ruby-font-lock-docs): ignore after `=begin'
+ and `=end'.
+
+ * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns):
+ added `yield' to keywords.
+
+ * misc/ruby-mode.el (ruby-font-lock-keywords, hilit-set-mode-patterns):
+ matches keywords at end of buffer.
+
Tue Feb 29 01:08:26 2000 Yukihiro Matsumoto <[email protected]>
* range.c (range_initialize): initialization done in `initialize';
diff --git a/README.EXT b/README.EXT
index 68726b793d..cd0be84b56 100644
--- a/README.EXT
+++ b/README.EXT
@@ -67,7 +67,7 @@ data-types, the code will be like:
break;
default:
/* raise exception */
- Fail("not valid value");
+ rb_raise(rb_eTypeError, "not valid value");
break;
}
@@ -203,6 +203,11 @@ To define class or module, use functions below:
These functions return the newly created class or module. You may
want to save this reference into the variable to use later.
+To define nested class or module, use functions below:
+
+ VALUE rb_define_class_under(VALUE outer, char *name, VALUE super)
+ VALUE rb_define_module_under(VALUE outer, char *name)
+
2.1.2 Method/singleton method definition
To define methods or singleton methods, use functions below:
@@ -387,9 +392,9 @@ The prototypes of the getter and setter functions are as following:
To wrapping and objectify the C pointer as Ruby object (so called
DATA), use Data_Wrap_Struct().
- Data_Wrap_Struct(klass,mark,free,ptr)
+ Data_Wrap_Struct(klass, mark, free, ptr)
-Data_Wrap_Struct() returns a created DATA object. The class argument
+Data_Wrap_Struct() returns a created DATA object. The klass argument
is the class for the DATA object. The mark argument is the function
to mark Ruby objects pointed by this data. The free argument is the
function to free the pointer allocation. The functions, mark and
@@ -484,7 +489,7 @@ struct dbmdata {
};
-obj = Data_Make_Struct(klass,struct dbmdata,0,free_dbm,dbmp);
+obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
--
This code wraps dbmdata structure into Ruby object. We avoid wrapping
@@ -598,7 +603,7 @@ not be done.
If the file named depend exists, Makefile will include that file to
check dependency. You can make this file by invoking
- % gcc -MM *.c > depend
+ % gcc -MM *.c > depend
It's no harm. Prepare it.
@@ -657,8 +662,6 @@ ruby language core
utility functions
dln.c
- fnmatch.c
- glob.c
regex.c
st.c
util.c
@@ -681,9 +684,11 @@ class library
file.c
hash.c
io.c
+ marshal.c
math.c
numeric.c
pack.c
+ prec.c
process.c
random.c
range.c
@@ -779,11 +784,11 @@ Defines a read-only global variable. Works just like
rb_define_variable(), except defined variable is read-only.
void rb_define_virtual_variable(char *name,
- VALUE (*getter)(), VALUE (*setter)())
+ VALUE (*getter)(), VALUE (*setter)())
Defines a virtual variable, whose behavior is defined by pair of C
functions. The getter function is called when the variable is
-referred. The setter function is called when the value is set to the
+referred. The setter function is called when the value is set to the
variable. The prototype for getter/setter functions are:
VALUE getter(ID id)
@@ -874,7 +879,7 @@ Returns the name corresponding ID.
Returns the name of the class.
- int rb_respond_to(VALUE object, ID id)
+ int rb_respond_to(VALUE object, ID id)
Returns true if the object reponds to the message specified by id.
diff --git a/README.EXT.jp b/README.EXT.jp
index 6a049d0222..419d7e37a7 100644
--- a/README.EXT.jp
+++ b/README.EXT.jp
@@ -73,7 +73,7 @@ ruby.h�Ǥ�TYPE()�Ȥ����ޥ������������Ƥ��ơ�VALUE�Υǡ���
break;
default:
/* �㳰��ȯ�������� */
- TypeError("not valid value");
+ rb_raise(rb_eTypeError, "not valid value");
break;
}
@@ -252,7 +252,7 @@ Ruby���󶡤���Ƥ���ؿ���Ȥ���Ruby���󥿥ץ꥿�˿�������ǽ
�᥽�åɤ��ðۥ᥽�åɤ��������ˤϰʲ��δؿ���Ȥ��ޤ���
- void rb_define_method(VALUE class, char *name,
+ void rb_define_method(VALUE klass, char *name,
VALUE (*func)(), int argc)
void rb_define_singleton_method(VALUE object, char *name,
@@ -277,8 +277,8 @@ argc��-1�λ��ϰ����������������Ϥ���ޤ���argc��-2�λ��ϰ�
�᥽�åɤ��������ؿ��Ϥ⤦��Ĥ���ޤ����ҤȤĤ�private��
���åɤ��������ؿ��ǡ�������rb_define_method()��Ʊ���Ǥ���
- void rb_define_private_method(VALUE class, char *name,
- VALUE (*func)(), int argc)
+ void rb_define_private_method(VALUE klass, char *name,
+ VALUE (*func)(), int argc)
private�᥽�åɤȤϴؿ������Ǥ����ƤӽФ����Ȥν���ʤ��᥽��
�ɤǤ���
@@ -312,7 +312,7 @@ private�᥽�åɤȤϴؿ������Ǥ����ƤӽФ����Ȥν���ʤ��᥽��
��ĥ�饤�֥�꤬ɬ�פ�����Ϥ��餫����������Ƥ����������ɤ�
�Ǥ��礦��������������ؿ�����Ĥ���ޤ���
- void rb_define_const(VALUE class, char *name, VALUE val)
+ void rb_define_const(VALUE klass, char *name, VALUE val)
void rb_define_global_const(char *name, VALUE val)
���Ԥ�����Υ��饹/�⥸�塼���°�����������������Ρ���
@@ -467,11 +467,11 @@ Ruby���֥������Ȥ�C�ι�¤��(�ؤΥݥ���)�򤯤�ळ�Ȥ�Ruby
Data���֥������Ȥ��������ƹ�¤�Τ�Ruby���֥������Ȥ˥��ץ���
�����뤿��ˤϡ��ʲ��Υޥ�����Ȥ��ޤ���
- Data_Wrap_Struct(class,mark,free,ptr)
+ Data_Wrap_Struct(klass, mark, free, ptr)
���Υޥ���������ͤ��������줿Data���֥������ȤǤ���
-class�Ϥ���Data���֥������ȤΥ��饹�Ǥ���ptr�ϥ��ץ��벽����
+klass�Ϥ���Data���֥������ȤΥ��饹�Ǥ���ptr�ϥ��ץ��벽����
C�ι�¤�ΤؤΥݥ��󥿤Ǥ���mark�Ϥ��ι�¤�Τ�Ruby�Υ��֥���
���Ȥؤλ��Ȥ�������˻Ȥ��ؿ��Ǥ������Τ褦�ʻ��Ȥ�ޤޤʤ�
���ˤ�0����ꤷ�ޤ���
@@ -484,11 +484,11 @@ free�Ϥ��ι�¤�Τ��⤦���פˤʤä����˸ƤФ��ؿ��Ǥ�������
C�ι�¤�Τγ�����Data���֥������Ȥ�������Ʊ���˹Ԥ��ޥ�����
���ưʲ��Τ�Τ��󶡤���Ƥ��ޤ���
- Data_Make_Struct(class, type, mark, free, sval)
+ Data_Make_Struct(klass, type, mark, free, sval)
���Υޥ���������ͤ��������줿Data���֥������ȤǤ���
-class, mark, free��Data_Wrap_Struct��Ʊ��Ư���򤷤ޤ���type
+klass, mark, free��Data_Wrap_Struct��Ʊ��Ư���򤷤ޤ���type
�ϳ�����Ƥ�C��¤�Τη��Ǥ���������Ƥ�줿��¤�Τ��ѿ�sval
����������ޤ��������ѿ��η��� (type*) �Ǥ���ɬ�פ�����ޤ���
@@ -588,7 +588,7 @@ struct dbmdata {
};
-obj = Data_Make_Struct(class,struct dbmdata,0,free_dbm,dbmp);
+obj = Data_Make_Struct(klass, struct dbmdata, 0, free_dbm, dbmp);
--
�����Ǥ�dbmstruct��¤�ΤؤΥݥ��󥿤�Data�˥��ץ��벽���Ƥ�
@@ -633,10 +633,10 @@ fdbm_delete(obj, keystr)
--
static VALUE
-fdbm_s_open(argc, argv, class)
+fdbm_s_open(argc, argv, klass)
int argc;
VALUE *argv;
- VALUE class;
+ VALUE klass;
{
:
if (rb_scan_args(argc, argv, "11", &file, &vmode) == 1) {
@@ -712,7 +712,7 @@ Makefile������ο����ˤʤ�extconf.rb�Ȥ����ե��������
�⤷���ǥ��쥯�ȥ��depend�Ȥ����ե����뤬¸�ߤ���С�
Makefile����¸�ط�������å����Ƥ���ޤ���
- % gcc -MM *.c > depend
+ % gcc -MM *.c > depend
�ʤɤǺ�뤳�Ȥ�����ޤ������ä�»��̵���Ǥ��礦��
@@ -793,8 +793,6 @@ Ruby�������
�桼�ƥ���ƥ��ؿ�
dln.c
- fnmatch.c
- glob.c
regex.c
st.c
util.c
@@ -821,6 +819,7 @@ Ruby���ޥ�ɤμ���
math.c
numeric.c
pack.c
+ prec.c
process.c
random.c
range.c
@@ -860,7 +859,7 @@ Qfalse
** C�ǡ����Υ��ץ��벽
-Data_Wrap_Struct(VALUE class, void (*mark)(), void (*free)(), void *sval)
+Data_Wrap_Struct(VALUE klass, void (*mark)(), void (*free)(), void *sval)
C��Ǥ�դΥݥ��󥿤򥫥ץ��벽����Ruby���֥������Ȥ��֤�����
�Υݥ��󥿤�Ruby���饢����������ʤ��ʤä�����free�ǻ��ꤷ��
@@ -868,7 +867,7 @@ Data_Wrap_Struct(VALUE class, void (*mark)(), void (*free)(), void *sval)
�������Ȥ�ؤ��Ƥ����硤mark�˻��ꤹ��ؿ��ǥޡ�������ɬ��
�����롥
-Data_Make_Struct(class, type, mark, free, sval)
+Data_Make_Struct(klass, type, mark, free, sval)
type���Υ����malloc�����ѿ�sval�����������塤����򥫥ץ�
�벽�����ǡ������֤��ޥ�����
@@ -915,7 +914,7 @@ VALUE rb_define_module_under(VALUE module, char *name, VALUE super)
������Ruby�⥸�塼����������module������Ȥ���������롥
-void rb_include_module(VALUE class, VALUE module)
+void rb_include_module(VALUE klass, VALUE module)
�⥸�塼��򥤥󥯥롼�ɤ��롥class�����Ǥ�module�򥤥�
�롼�ɤ��Ƥ�����ˤϲ��⤷�ʤ�(¿�ť��󥯥롼�ɤζػ�)��
@@ -974,7 +973,7 @@ void rb_define_global_const(char *name, VALUE val)
** �᥽�å����
-rb_define_method(VALUE class, char *name, VALUE (*func)(), int argc)
+rb_define_method(VALUE klass, char *name, VALUE (*func)(), int argc)
�᥽�åɤ�������롥argc��self����������ο���argc��-1�λ�,
�ؿ��ˤϰ����ο�(self��ޤޤʤ�)����1����, �������������2
@@ -982,17 +981,17 @@ rb_define_method(VALUE class, char *name, VALUE (*func)(), int argc)
��1������self, ��2������args(args�ϰ�����ޤ�Ruby������)��
����������Ϳ�����롥
-rb_define_private_method(VALUE class, char *name, VALUE (*func)(), int argc)
+rb_define_private_method(VALUE klass, char *name, VALUE (*func)(), int argc)
private�᥽�åɤ�������롥������rb_define_method()��Ʊ����
-rb_define_singleton_method(VALUE class, char *name, VALUE (*func)(), int argc)
+rb_define_singleton_method(VALUE klass, char *name, VALUE (*func)(), int argc)
�ðۥ᥽�åɤ�������롥������rb_define_method()��Ʊ����
rb_scan_args(int argc, VALUE *argv, char *fmt, ...)
- argc,argv������Ϳ����줿������ʬ�򤹤롥fmt��ɬ�ܰ����ο�,
+ argc, argv������Ϳ����줿������ʬ�򤹤롥fmt��ɬ�ܰ����ο�,
�ղð����ο�, �Ĥ�ΰ��������뤫����ꤹ��ʸ�����, "����
����*"�Ȥ��������Ǥ��롥 2 ���ܤο�����"*"�Ϥ��줾���ά��
ǽ�Ǥ��롥ɬ�ܰ�������Ĥ�ʤ�����0����ꤹ�롥��3������
@@ -1009,7 +1008,7 @@ VALUE rb_funcall(VALUE recv, ID mid, int narg, ...)
VALUE rb_funcall2(VALUE recv, ID mid, int argc, VALUE *argv)
- �᥽�åɸƤӽФ���������argc,argv�������Ϥ���
+ �᥽�åɸƤӽФ���������argc, argv�������Ϥ���
VALUE rb_eval_string(char *str)
@@ -1023,9 +1022,9 @@ char *rb_id2name(ID id)
ID���б�����ʸ������֤�(�ǥХå���)��
-char *rb_class2name(VALUE class)
+char *rb_class2name(VALUE klass)
- class��̾�����֤�(�ǥХå���)��class��̾��������ʤ����ˤ�,
+ ���饹��̾�����֤�(�ǥХå���)�����饹��̾��������ʤ����ˤ�,
������̤ä�̾������ĥ��饹��̾�����֤���
int rb_respond_to(VALUE obj, ID id)
@@ -1134,7 +1133,6 @@ find_library(lib, func, path...)
�ؿ�func��������Ƥ���饤�֥��lib��¸�ߤ� -Lpath ���ɲ�
���ʤ�������å����롥�饤�֥�꤬���դ��ä�����true���֤���
- ��̤򥭥�å��夷�ʤ���
have_func(func)
@@ -1150,8 +1148,7 @@ have_header(header)
find_header(header)
�إå��ե������¸�ߤ� -Ipath ���ɲä��ʤ�������å����롥
- �إå��ե����뤬���դ��ä���true���֤�����̤򥭥�å��夷
- �ʤ���
+ �إå��ե����뤬���դ��ä���true���֤���
create_makefile(target)
diff --git a/eval.c b/eval.c
index d32a365640..66910fb9c0 100644
--- a/eval.c
+++ b/eval.c
@@ -4300,6 +4300,27 @@ rb_funcall3(recv, mid, argc, argv)
return rb_call(CLASS_OF(recv), recv, mid, argc, argv, 0);
}
+VALUE
+rb_call_super(argc, argv)
+ int argc;
+ VALUE *argv;
+{
+ VALUE result;
+
+ if (ruby_frame->last_class == 0) {
+ rb_raise(rb_eNameError, "superclass method `%s' disabled",
+ rb_id2name(ruby_frame->last_func));
+ }
+
+ PUSH_ITER(ruby_iter->iter?ITER_PRE:ITER_NOT);
+ result = rb_call(RCLASS(ruby_frame->last_class)->super,
+ ruby_frame->self, ruby_frame->last_func,
+ argc, argv, 3);
+ POP_ITER();
+
+ return result;
+}
+
static VALUE
backtrace(lev)
int lev;
diff --git a/ext/Win32API/Win32API.c b/ext/Win32API/Win32API.c
index 38268d0474..433d13abeb 100644
--- a/ext/Win32API/Win32API.c
+++ b/ext/Win32API/Win32API.c
@@ -52,13 +52,10 @@ Win32API_initialize(self, dllname, proc, import, export)
int len;
int ex;
- hdll = GetModuleHandle(RSTRING(dllname)->ptr);
- if (!hdll) {
- hdll = LoadLibrary(RSTRING(dllname)->ptr);
- if (!hdll)
- rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
- Data_Wrap_Struct(self, 0, Win32API_FreeLibrary, hdll);
- }
+ hdll = LoadLibrary(RSTRING(dllname)->ptr);
+ if (!hdll)
+ rb_raise(rb_eRuntimeError, "LoadLibrary: %s\n", RSTRING(dllname)->ptr);
+ rb_iv_set(self, "__hdll__", Data_Wrap_Struct(self, 0, Win32API_FreeLibrary, hdll));
hproc = GetProcAddress(hdll, RSTRING(proc)->ptr);
if (!hproc) {
str = rb_str_new3(proc);
diff --git a/ext/curses/curses.c b/ext/curses/curses.c
index b0e2ef5bc7..db620654bd 100644
--- a/ext/curses/curses.c
+++ b/ext/curses/curses.c
@@ -424,7 +424,6 @@ window_s_new(class, h, w, top, left)
wclear(window);
win = prep_window(class, window);
args[0] = h; args[1] = w; args[2] = top; args[3] = left;
- rb_obj_call_init(win, 4, args);
return win;
}
@@ -448,7 +447,6 @@ window_subwin(obj, h, w, top, left)
NUM2INT(top), NUM2INT(left));
win = prep_window(cWindow, window);
args[0] = h; args[1] = w; args[2] = top; args[3] = left;
- rb_obj_call_init(win, 4, args);
return win;
}
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 2aeede2672..c68c5b427e 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -91,7 +91,6 @@ fdbm_s_open(argc, argv, klass)
obj = Data_Make_Struct(klass,struct dbmdata,0,free_dbm,dbmp);
dbmp->di_dbm = dbm;
dbmp->di_size = -1;
- rb_obj_call_init(obj, argc, argv);
return obj;
}
diff --git a/ext/extmk.rb.in b/ext/extmk.rb.in
index e2c5d5bd3f..cae02d576f 100644
--- a/ext/extmk.rb.in
+++ b/ext/extmk.rb.in
@@ -560,7 +560,11 @@ def extmake(target)
elsif $clean
system "#{$make} clean"
else
- system "#{$make} all" or exit
+ unless system "#{$make} all"
+ if ENV["MAKEFLAGS"] != "k" and ENV["MFLAGS"] != "-k"
+ exit
+ end
+ end
end
end
if $static
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 116b19d18e..b4d8212717 100644
--- a/ext/gdbm/gdbm.c
+++ b/ext/gdbm/gdbm.c
@@ -88,7 +88,6 @@ fgdbm_s_open(argc, argv, klass)
obj = Data_Make_Struct(klass,struct dbmdata,0,free_dbm,dbmp);
dbmp->di_dbm = dbm;
dbmp->di_size = -1;
- rb_obj_call_init(obj, argc, argv);
return obj;
}
diff --git a/ext/md5/md5init.c b/ext/md5/md5init.c
index 552a407c6d..f3dafed336 100644
--- a/ext/md5/md5init.c
+++ b/ext/md5/md5init.c
@@ -95,7 +95,6 @@ md5_new(argc, argv, class)
if (!NIL_P(arg)) {
md5_update(obj, arg);
}
- rb_obj_call_init(obj, argc, argv);
return obj;
}
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 7838b151a3..ac79d89134 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -530,6 +530,9 @@ ip_addrsetup(host, port)
else if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
mkinetaddr(INADDR_BROADCAST, hbuf, sizeof(hbuf));
}
+ else if (strlen(name) > sizeof(hbuf)-1) {
+ rb_raise(rb_eArgError, "hostname too long (%d)", strlen(name));
+ }
else {
strcpy(hbuf, name);
}
@@ -551,6 +554,9 @@ ip_addrsetup(host, port)
hints.ai_socktype = SOCK_DGRAM;
error = getaddrinfo(hostp, portp, &hints, &res);
if (error) {
+ if (hostp && hostp[strlen(hostp)-1] == '\n') {
+ rb_raise(rb_eSocket, "newline at the end of hostname");
+ }
rb_raise(rb_eSocket, "%s", gai_strerror(error));
}
diff --git a/lib/cgi.rb b/lib/cgi.rb
index e2ba3141bc..b973904997 100644
--- a/lib/cgi.rb
+++ b/lib/cgi.rb
@@ -648,10 +648,12 @@ convert string charset, and set language to "ja".
=end
def Cookie::parse(raw_cookie)
cookies = Hash.new([])
+ return cookies unless raw_cookie
raw_cookie.split('; ').each do |pairs|
name, values = pairs.split('=',2)
name = CGI::unescape(name)
+ values ||= ""
values = values.split('&').filter{|v| CGI::unescape(v) }
if cookies.has_key?(name)
cookies[name].value.push(*values)
@@ -877,8 +879,7 @@ convert string charset, and set language to "ja".
)
end
- @cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or
- env_table['COOKIE'] or ""))
+ @cookies = CGI::Cookie::parse((env_table['HTTP_COOKIE'] or env_table['COOKIE']))
end
private :initialize_query
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 9ea9ab3660..05fa5dccc7 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -52,6 +52,10 @@ class PStore
in_transaction
@table[name] = value
end
+ def delete(name)
+ in_transaction
+ @table.delete name
+ end
def roots
in_transaction
diff --git a/lib/weakref.rb b/lib/weakref.rb
index c6fe8cd21b..18b530f2ae 100644
--- a/lib/weakref.rb
+++ b/lib/weakref.rb
@@ -40,7 +40,7 @@ class WeakRef<Delegator
ObjectSpace.call_finalizer orig
ObjectSpace.call_finalizer self
ID_MAP[@__id] = [] unless ID_MAP[@__id]
- ID_MAP[@__id].concat self.__id__
+ ID_MAP[@__id].push self.__id__
ID_REV_MAP[self.id] = @__id
end
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index cb85458b86..3b0bb2a2bc 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -314,7 +314,9 @@ The variable ruby-indent-level controls the amount of indentation.
(if (or (and (not (bolp))
(progn
(forward-char -1)
- (eq ?_ (char-after (point)))))
+ (setq w (char-after (point)))
+ (or (eq ?_ w)
+ (eq ?. w))))
(progn
(goto-char pnt)
(setq w (char-after (point)))
@@ -339,7 +341,9 @@ The variable ruby-indent-level controls the amount of indentation.
(or (bolp)
(progn
(forward-char -1)
- (not (eq ?_ (char-after (point))))))
+ (setq w (char-after (point)))
+ (not (or (eq ?_ w)
+ (eq ?. w)))))
(goto-char pnt)
(setq w (char-after (point)))
(not (eq ?_ w))
@@ -622,12 +626,12 @@ An end of a defun is found by moving forward from the beginning of one."
(setq font-lock-keywords ruby-font-lock-keywords)))
(defun ruby-font-lock-docs (limit)
- (if (re-search-forward "^=begin\\s *$" limit t)
+ (if (re-search-forward "^=begin\\(\\s \\|$\\)" limit t)
(let (beg)
(beginning-of-line)
(setq beg (point))
(forward-line 1)
- (if (re-search-forward "^=end\\s *$" limit t)
+ (if (re-search-forward "^=end\\(\\s \\|$\\)" limit t)
(progn
(set-match-data (list beg (point)))
t)))))
@@ -672,12 +676,13 @@ An end of a defun is found by moving forward from the beginning of one."
"until"
"when"
"while"
+ "yield"
)
"\\|")
- "\\)\\>[^_]")
+ "\\)\\>\\([^_]\\|$\\)")
2)
;; variables
- '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\b[^_]"
+ '("\\(^\\|[^_:.@$]\\|\\.\\.\\)\\b\\(nil\\|self\\|true\\|false\\)\\b\\([^_]\\|$\\)"
2 font-lock-variable-name-face)
;; variables
'("[$@].\\(\\w\\|_\\)*"
@@ -708,8 +713,8 @@ An end of a defun is found by moving forward from the beginning of one."
("^\\s *\\(require\\|load\\).*$" nil include)
("^\\s *\\(include\\|alias\\|undef\\).*$" nil decl)
("^\\s *\\<\\(class\\|def\\|module\\)\\>" "[)\n;]" defun)
- ("[^_]\\<\\(begin\\|case\\|else\\|elsif\\|end\\|ensure\\|for\\|if\\|unless\\|rescue\\|then\\|when\\|while\\|until\\|do\\)\\>[^_]" 1 defun)
- ("[^_]\\<\\(and\\|break\\|next\\|raise\\|fail\\|in\\|not\\|or\\|redo\\|retry\\|return\\|super\\|yield\\|catch\\|throw\\|self\\|nil\\)\\>[^_]" 1 keyword)
+ ("[^_]\\<\\(begin\\|case\\|else\\|elsif\\|end\\|ensure\\|for\\|if\\|unless\\|rescue\\|then\\|when\\|while\\|until\\|do\\|yield\\)\\>\\([^_]\\|$\\)" 1 defun)
+ ("[^_]\\<\\(and\\|break\\|next\\|raise\\|fail\\|in\\|not\\|or\\|redo\\|retry\\|return\\|super\\|yield\\|catch\\|throw\\|self\\|nil\\)\\>\\([^_]\\|$\\)" 1 keyword)
("\\$\\(.\\|\\sw+\\)" nil type)
("[$@].[a-zA-Z_0-9]*" nil struct)
("^__END__" nil label))))
diff --git a/node.h b/node.h
index 1f44ba0fff..a7ee1a0d14 100644
--- a/node.h
+++ b/node.h
@@ -325,9 +325,6 @@ typedef struct RNode {
#define NEW_PREEXE(b) NEW_SCOPE(b)
#define NEW_POSTEXE() rb_node_newnode(NODE_POSTEXE,0,0,0)
-NODE *rb_node_newnode();
-VALUE rb_method_booundp();
-
#define NOEX_PUBLIC 0
#define NOEX_UNDEF 1
#define NOEX_CFUNC 1
diff --git a/ruby.h b/ruby.h
index 1eaf92eb3f..7dcfac1ea6 100644
--- a/ruby.h
+++ b/ruby.h
@@ -422,6 +422,7 @@ VALUE rb_funcall __((VALUE, ID, int, ...));
VALUE rb_funcall2 _((VALUE, ID, int, VALUE*));
VALUE rb_funcall3 _((VALUE, ID, int, VALUE*));
int rb_scan_args __((int, VALUE*, const char*, ...));
+VALUE rb_call_super _((int, VALUE*));
VALUE rb_gv_set _((const char*, VALUE));
VALUE rb_gv_get _((const char*));
diff --git a/version.h b/version.h
index 5f193a2e17..e59402222b 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
#define RUBY_VERSION "1.5.2"
-#define RUBY_RELEASE_DATE "2000-02-29"
+#define RUBY_RELEASE_DATE "2000-03-06"
#define RUBY_VERSION_CODE 152
-#define RUBY_RELEASE_CODE 20000229
+#define RUBY_RELEASE_CODE 20000306