Permalink
Browse files

1.4.1

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
1 parent 1f72ff9 commit 21d0b0785c4be76fac8c421af009aa57fbbb85f5 matz committed Sep 16, 1999
Showing with 397 additions and 163 deletions.
  1. +53 −0 ChangeLog
  2. +16 −0 MANIFEST
  3. +22 −4 compar.c
  4. +26 −8 eval.c
  5. +8 −1 file.c
  6. +177 −97 lib/date2.rb
  7. +0 −1 lib/parsedate.rb
  8. +44 −14 lib/telnet.rb
  9. +0 −1 numeric.c
  10. +10 −8 parse.y
  11. +1 −1 prec.c
  12. +2 −1 random.c
  13. +19 −5 range.c
  14. +1 −1 re.c
  15. +1 −5 sample/README
  16. +2 −2 sample/cal.rb
  17. +2 −2 string.c
  18. +9 −8 time.c
  19. +4 −4 version.h
View
@@ -1,3 +1,56 @@
+Thu Sep 16 18:40:08 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * stable version 1.4.1 released.
+
+Thu Sep 16 11:33:22 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * string.c (rb_str_match): should return false.
+
+Wed Sep 15 22:46:37 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * re.c (rb_reg_s_quote): should quote `-' too.
+
+Tue Sep 14 15:23:22 1999 Nobuyoshi Nakada <nobu.nakada@nifty.ne.jp>
+
+ * parse.y (yylex): no need to ignore `\r' here.
+
+ * parse.y (nextc): strip `\r' from text.
+
+ * parse.y (nextc): support `__END__\r\n' type terminator.
+
+Mon Sep 13 10:49:19 1999 WATANABE Hirofumi <watanabe@ase.ptg.sony.co.jp>
+
+ * eval.c (rb_eval): needless RTEST(ruby_verbose) removed.
+
+Wed Sep 8 11:37:38 1999 Tadayoshi Funaba <tadf@kt.rim.or.jp>
+
+ * time.c (make_time_t): bit more strict comparison.
+
+Tue Sep 7 00:50:56 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * range.c (range_each): use rb_str_upto() for strings.
+
+ * string.c (rb_str_upto): set upper limit by comparing curr <= end.
+
+ * range.c (range_each): should check equality to handle magic
+ increment.
+
+Mon Sep 6 22:43:33 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * eval.c (rb_eval): break/next/redo available within -n/-p loop.
+
+Fri Sep 3 11:14:31 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
+
+ * compar.c (cmp_equal): should not raise exception; protect by
+ rb_rescue().
+
+Thu Sep 2 05:23:05 1999 WATANABE Hirofumi <eban@os.rim.or.jp>
+
+ * file.c (rb_file_s_expand_path): use dirsep, instead of character
+ literal '/'.
+
+ * file.c (rb_file_s_expand_path): reduce multiple dirsep at the top.
+
Wed Sep 1 00:28:27 1999 Yukihiro Matsumoto <matz@netlab.co.jp>
* eval.c (rb_call): call rb_undefined() if a method appears not to
View
@@ -88,6 +88,7 @@ lib/English.rb
lib/Env.rb
lib/README
lib/base64.rb
+lib/cgi.rb
lib/cgi-lib.rb
lib/complex.rb
lib/date.rb
@@ -104,13 +105,28 @@ lib/ftools.rb
lib/getopts.rb
lib/getoptlong.rb
lib/importenv.rb
+lib/irb/bind.rb
+lib/irb/completion.rb
+lib/irb/frame.rb
+lib/irb/input-method.rb
+lib/irb/loader.rb
+lib/irb/main.rb
+lib/irb/multi-irb.rb
+lib/irb/ruby-lex.rb
+lib/irb/ruby-token.rb
+lib/irb/slex.rb
+lib/irb/version.rb
+lib/irb/xmp.rb
lib/jcode.rb
lib/mailread.rb
lib/mathn.rb
lib/matrix.rb
lib/mkmf.rb
lib/monitor.rb
lib/mutex_m.rb
+lib/net/pop.rb
+lib/net/session.rb
+lib/net/smtp.rb
lib/observer.rb
lib/open3.rb
lib/ostruct.rb
View
@@ -17,17 +17,35 @@ VALUE rb_mComparable;
static ID cmp;
static VALUE
-cmp_eq(x, y)
- VALUE x, y;
+cmp_eq(a)
+ VALUE *a;
{
- VALUE c = rb_funcall(x, cmp, 1, y);
+ VALUE c = rb_funcall(a[0], cmp, 1, a[1]);
int t = NUM2INT(c);
if (t == 0) return Qtrue;
return Qfalse;
}
static VALUE
+cmp_failed()
+{
+ return Qfalse;
+}
+
+static VALUE
+cmp_equal(x, y)
+ VALUE x, y;
+{
+ VALUE a[2];
+
+ if (x == y) return Qtrue;
+
+ a[0] = x; a[1] = y;
+ return rb_rescue(cmp_eq, (VALUE)a, cmp_failed, 0);
+}
+
+static VALUE
cmp_gt(x, y)
VALUE x, y;
{
@@ -89,7 +107,7 @@ void
Init_Comparable()
{
rb_mComparable = rb_define_module("Comparable");
- rb_define_method(rb_mComparable, "==", cmp_eq, 1);
+ rb_define_method(rb_mComparable, "==", cmp_equal, 1);
rb_define_method(rb_mComparable, ">", cmp_gt, 1);
rb_define_method(rb_mComparable, ">=", cmp_ge, 1);
rb_define_method(rb_mComparable, "<", cmp_lt, 1);
View
34 eval.c
@@ -169,7 +169,7 @@ rb_get_method_body(klassp, idp, noexp)
struct cache_entry *ent;
if ((body = search_method(klass, id, &origin)) == 0 || !body->nd_body) {
- /* store in cache */
+ /* store empty info in cache */
ent = cache + EXPR1(klass, id);
ent->klass = klass;
ent->origin = klass;
@@ -1795,11 +1795,31 @@ rb_eval(self, node)
}
break;
- /* nodes for speed-up(top-level loop for -n/-p) */
+ /* node for speed-up(top-level loop for -n/-p) */
case NODE_OPT_N:
- while (!NIL_P(rb_gets())) {
- rb_eval(self, node->nd_body);
+ PUSH_TAG(PROT_NONE);
+ switch (state = EXEC_TAG()) {
+ case 0:
+ opt_n_next:
+ while (!NIL_P(rb_gets())) {
+ opt_n_redo:
+ rb_eval(self, node->nd_body);
+ }
+ break;
+
+ case TAG_REDO:
+ state = 0;
+ goto opt_n_redo;
+ case TAG_NEXT:
+ state = 0;
+ goto opt_n_next;
+ case TAG_BREAK:
+ state = 0;
+ default:
+ break;
}
+ POP_TAG();
+ if (state) JUMP_TAG(state);
RETURN(Qnil);
case NODE_SELF:
@@ -2371,10 +2391,8 @@ rb_eval(self, node)
/* check for static scope constants */
if (RTEST(ruby_verbose) &&
ev_const_defined((NODE*)ruby_frame->cbase, node->nd_vid)) {
- if (RTEST(ruby_verbose)) {
- rb_warning("already initialized constant %s",
- rb_id2name(node->nd_vid));
- }
+ rb_warn("already initialized constant %s",
+ rb_id2name(node->nd_vid));
}
rb_const_set(ruby_class, node->nd_vid, result);
break;
View
9 file.c
@@ -1107,7 +1107,7 @@ rb_file_s_expand_path(argc, argv)
}
}
#endif
- else if (s[0] != '/') {
+ else if (!isdirsep(*s)) {
if (argc == 2) {
dname = rb_file_s_expand_path(1, &dname);
strcpy(buf, RSTRING(dname)->ptr);
@@ -1122,6 +1122,13 @@ rb_file_s_expand_path(argc, argv)
p = &buf[strlen(buf)];
while (p > buf && *(p - 1) == '/') p--;
}
+ else if (isdirsep(*s)) {
+ while (*s && isdirsep(*s)) {
+ *p++ = '/';
+ s++;
+ }
+ if (p > buf && *s) p--;
+ }
*p = '/';
for ( ; *s; s++) {
Oops, something went wrong.

0 comments on commit 21d0b07

Please sign in to comment.