summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog24
-rw-r--r--enum.c2
-rw-r--r--eval.c3
-rw-r--r--ext/tk/lib/tk.rb4
-rw-r--r--process.c2
-rw-r--r--regex.c2
-rw-r--r--string.c6
-rw-r--r--version.h4
8 files changed, 37 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 063778a2e5..3f80ba6924 100644
--- a/ChangeLog
+++ b/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>
* eval.c (cvar_cbase): utility function to find innermost non
diff --git a/enum.c b/enum.c
index 5adbef4962..e896ee394b 100644
--- a/enum.c
+++ b/enum.c
@@ -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
diff --git a/eval.c b/eval.c
index d12a9dc8ba..90d6bde62e 100644
--- a/eval.c
+++ b/eval.c
@@ -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
diff --git a/process.c b/process.c
index 2fc62828d0..cb4eae0a1a 100644
--- a/process.c
+++ b/process.c
@@ -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
diff --git a/regex.c b/regex.c
index eddfd2817b..2ed6a7ba78 100644
--- a/regex.c
+++ b/regex.c
@@ -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;
diff --git a/string.c b/string.c
index 099f6a81d1..5244f8e5f2 100644
--- a/string.c
+++ b/string.c
@@ -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;
diff --git a/version.h b/version.h
index 7226b593bd..13474adc13 100644
--- a/version.h
+++ b/version.h
@@ -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