diff options
-rw-r--r-- | ChangeLog | 24 | ||||
-rw-r--r-- | enum.c | 2 | ||||
-rw-r--r-- | eval.c | 3 | ||||
-rw-r--r-- | ext/tk/lib/tk.rb | 4 | ||||
-rw-r--r-- | process.c | 2 | ||||
-rw-r--r-- | regex.c | 2 | ||||
-rw-r--r-- | string.c | 6 | ||||
-rw-r--r-- | version.h | 4 |
8 files changed, 37 insertions, 10 deletions
@@ -1,3 +1,27 @@ +Mon Mar 11 18:03:37 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * regex.c (re_compile_pattern): '\0111' should be '\011' plus '1', + since octal literals are formed by three digits at most. + +Mon Mar 11 14:44:38 2002 Yukihiro Matsumoto <matz@ruby-lang.org> + + * eval.c (rb_eval_cmd): cbase should not be NULL; it should be + either ruby_wrapper or Object. + +Sun Mar 10 02:18:22 2002 Koji Arai <jca02266@nifty.ne.jp> + + * enum.c (enum_each_with_index): should return self. + + * process.c (proc_setpgrp): should return value for non-void function. + + * process.c (proc_getpgid): should raise exception if getpgid() return -1. + + * string.c (rb_str_ljust): should return a duplicated string. + + * string.c (rb_str_rjust): ditto. + + * string.c (rb_str_center): ditto. + Fri Mar 8 02:21:32 2002 Yukihiro Matsumoto <matz@ruby-lang.org> * eval.c (cvar_cbase): utility function to find innermost non @@ -319,7 +319,7 @@ enum_each_with_index(obj) rb_iterate(rb_each, obj, each_with_index_i, (VALUE)memo); rb_gc_force_recycle((VALUE)memo); - return Qnil; + return obj; } void @@ -1338,7 +1338,8 @@ rb_eval_cmd(cmd, arg) ruby_frame->last_func = 0; ruby_frame->last_class = 0; ruby_frame->self = ruby_top_self; - ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,ruby_wrapper,0,0); + ruby_frame->cbase = (VALUE)rb_node_newnode(NODE_CREF,0,0,0); + RNODE(ruby_frame->cbase)->nd_clss = ruby_wrapper ? ruby_wrapper : rb_cObject; if (OBJ_TAINTED(cmd)) { ruby_safe_level = 4; diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index f77bc8f0b7..e16895a190 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -945,8 +945,8 @@ module Tk def sizefrom(*args) tk_call('wm', 'sizefrom', path, *args) end - def state - tk_call 'wm', 'state', path + def state(state=None) + tk_call 'wm', 'state', path, state end def title(*args) tk_call 'wm', 'title', path, *args @@ -843,6 +843,7 @@ proc_getpgid(obj, pid) int i; i = getpgid(NUM2INT(pid)); + if (i < 0) rb_sys_fail(0); return INT2NUM(i); #else rb_notimplement(); @@ -940,6 +941,7 @@ proc_setpriority(obj, which, who, prio) #else rb_notimplement(); #endif + return INT2FIX(0); } static VALUE @@ -2267,7 +2267,7 @@ re_compile_pattern(pattern, size, bufp) /* octal */ case '0': had_mbchar = 0; - c = scan_oct(p, 3, &numlen); + c = scan_oct(p, 2, &numlen); p += numlen; had_num_literal = 1; goto numeric_char; @@ -2728,7 +2728,7 @@ rb_str_ljust(str, w) VALUE res; char *p, *pend; - if (width < 0 || RSTRING(str)->len >= width) return str; + if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str); res = rb_str_new(0, width); RBASIC(res)->klass = rb_obj_class(str); memcpy(RSTRING(res)->ptr, RSTRING(str)->ptr, RSTRING(str)->len); @@ -2749,7 +2749,7 @@ rb_str_rjust(str, w) VALUE res; char *p, *pend; - if (width < 0 || RSTRING(str)->len >= width) return str; + if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str); res = rb_str_new(0, width); RBASIC(res)->klass = rb_obj_class(str); p = RSTRING(res)->ptr; pend = p + width - RSTRING(str)->len; @@ -2771,7 +2771,7 @@ rb_str_center(str, w) char *p, *pend; long n; - if (width < 0 || RSTRING(str)->len >= width) return str; + if (width < 0 || RSTRING(str)->len >= width) return rb_str_dup(str); res = rb_str_new(0, width); RBASIC(res)->klass = rb_obj_class(str); n = (width - RSTRING(str)->len)/2; @@ -1,4 +1,4 @@ #define RUBY_VERSION "1.6.7" -#define RUBY_RELEASE_DATE "2002-03-08" +#define RUBY_RELEASE_DATE "2002-03-12" #define RUBY_VERSION_CODE 167 -#define RUBY_RELEASE_CODE 20020308 +#define RUBY_RELEASE_CODE 20020312 |