mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* regex.c (re_compile_pattern): '\0111' should be '\011' plus '1',
since octal literals are formed by three digits at most. * eval.c (rb_eval_cmd): cbase should not be NULL; it should be either ruby_wrapper or Object. * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
250f86b79a
commit
63a17aa5a2
8 changed files with 37 additions and 10 deletions
24
ChangeLog
24
ChangeLog
|
@ -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>
|
Fri Mar 8 02:21:32 2002 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (cvar_cbase): utility function to find innermost non
|
* eval.c (cvar_cbase): utility function to find innermost non
|
||||||
|
|
2
enum.c
2
enum.c
|
@ -319,7 +319,7 @@ enum_each_with_index(obj)
|
||||||
|
|
||||||
rb_iterate(rb_each, obj, each_with_index_i, (VALUE)memo);
|
rb_iterate(rb_each, obj, each_with_index_i, (VALUE)memo);
|
||||||
rb_gc_force_recycle((VALUE)memo);
|
rb_gc_force_recycle((VALUE)memo);
|
||||||
return Qnil;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
3
eval.c
3
eval.c
|
@ -1338,7 +1338,8 @@ rb_eval_cmd(cmd, arg)
|
||||||
ruby_frame->last_func = 0;
|
ruby_frame->last_func = 0;
|
||||||
ruby_frame->last_class = 0;
|
ruby_frame->last_class = 0;
|
||||||
ruby_frame->self = ruby_top_self;
|
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)) {
|
if (OBJ_TAINTED(cmd)) {
|
||||||
ruby_safe_level = 4;
|
ruby_safe_level = 4;
|
||||||
|
|
|
@ -945,8 +945,8 @@ module Tk
|
||||||
def sizefrom(*args)
|
def sizefrom(*args)
|
||||||
tk_call('wm', 'sizefrom', path, *args)
|
tk_call('wm', 'sizefrom', path, *args)
|
||||||
end
|
end
|
||||||
def state
|
def state(state=None)
|
||||||
tk_call 'wm', 'state', path
|
tk_call 'wm', 'state', path, state
|
||||||
end
|
end
|
||||||
def title(*args)
|
def title(*args)
|
||||||
tk_call 'wm', 'title', path, *args
|
tk_call 'wm', 'title', path, *args
|
||||||
|
|
|
@ -843,6 +843,7 @@ proc_getpgid(obj, pid)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
i = getpgid(NUM2INT(pid));
|
i = getpgid(NUM2INT(pid));
|
||||||
|
if (i < 0) rb_sys_fail(0);
|
||||||
return INT2NUM(i);
|
return INT2NUM(i);
|
||||||
#else
|
#else
|
||||||
rb_notimplement();
|
rb_notimplement();
|
||||||
|
@ -940,6 +941,7 @@ proc_setpriority(obj, which, who, prio)
|
||||||
#else
|
#else
|
||||||
rb_notimplement();
|
rb_notimplement();
|
||||||
#endif
|
#endif
|
||||||
|
return INT2FIX(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
2
regex.c
2
regex.c
|
@ -2267,7 +2267,7 @@ re_compile_pattern(pattern, size, bufp)
|
||||||
/* octal */
|
/* octal */
|
||||||
case '0':
|
case '0':
|
||||||
had_mbchar = 0;
|
had_mbchar = 0;
|
||||||
c = scan_oct(p, 3, &numlen);
|
c = scan_oct(p, 2, &numlen);
|
||||||
p += numlen;
|
p += numlen;
|
||||||
had_num_literal = 1;
|
had_num_literal = 1;
|
||||||
goto numeric_char;
|
goto numeric_char;
|
||||||
|
|
6
string.c
6
string.c
|
@ -2728,7 +2728,7 @@ rb_str_ljust(str, w)
|
||||||
VALUE res;
|
VALUE res;
|
||||||
char *p, *pend;
|
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);
|
res = rb_str_new(0, width);
|
||||||
RBASIC(res)->klass = rb_obj_class(str);
|
RBASIC(res)->klass = rb_obj_class(str);
|
||||||
memcpy(RSTRING(res)->ptr, RSTRING(str)->ptr, RSTRING(str)->len);
|
memcpy(RSTRING(res)->ptr, RSTRING(str)->ptr, RSTRING(str)->len);
|
||||||
|
@ -2749,7 +2749,7 @@ rb_str_rjust(str, w)
|
||||||
VALUE res;
|
VALUE res;
|
||||||
char *p, *pend;
|
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);
|
res = rb_str_new(0, width);
|
||||||
RBASIC(res)->klass = rb_obj_class(str);
|
RBASIC(res)->klass = rb_obj_class(str);
|
||||||
p = RSTRING(res)->ptr; pend = p + width - RSTRING(str)->len;
|
p = RSTRING(res)->ptr; pend = p + width - RSTRING(str)->len;
|
||||||
|
@ -2771,7 +2771,7 @@ rb_str_center(str, w)
|
||||||
char *p, *pend;
|
char *p, *pend;
|
||||||
long n;
|
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);
|
res = rb_str_new(0, width);
|
||||||
RBASIC(res)->klass = rb_obj_class(str);
|
RBASIC(res)->klass = rb_obj_class(str);
|
||||||
n = (width - RSTRING(str)->len)/2;
|
n = (width - RSTRING(str)->len)/2;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define RUBY_VERSION "1.6.7"
|
#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_VERSION_CODE 167
|
||||||
#define RUBY_RELEASE_CODE 20020308
|
#define RUBY_RELEASE_CODE 20020312
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue