Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* ext/pty/pty.c (pty_finalize_syswait): join (using Thread#value)

  before detach pid. [ruby-talk:71519]

* eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677],
  [ruby-dev:20202]

* eval.c (BEGIN_CALLARGS): restore outer block by using
  ruby_block->outer.

* eval.c (block_pass): do not alter block->prev, but block->outer.

* array.c (get_inspect_tbl): warning on wrong condition.

* eval.c (localjump_xvalue): renamed exitstatus to exit_value
  since it's not exit "status" after all.

* eval.c (localjump_error): add reason to LocalJumpError.

* compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value
  is nil. now take new 2 arguments.

* time.c (time_cmp): 2003-05-16 fix was incomplete.
  (ruby-bugs-ja:PR#458)


git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information...
commit 293fdb45e57673f78af3c381d9f4d35e305e8440 1 parent 8f0b6b7
matz authored
31 ChangeLog
... ... @@ -1,3 +1,20 @@
  1 +Tue May 20 00:09:41 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
  2 +
  3 + * ext/pty/pty.c (pty_finalize_syswait): join (using Thread#value)
  4 + before detach pid. [ruby-talk:71519]
  5 +
  6 +Mon May 19 23:02:10 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
  7 +
  8 + * eval.c (PUSH_FRAME): save outer ruby_block. [ruby-list:37677],
  9 + [ruby-dev:20202]
  10 +
  11 + * eval.c (BEGIN_CALLARGS): restore outer block by using
  12 + ruby_block->outer.
  13 +
  14 + * eval.c (block_pass): do not alter block->prev, but block->outer.
  15 +
  16 + * array.c (get_inspect_tbl): warning on wrong condition.
  17 +
1 18 Mon May 19 16:13:57 2003 Minero Aoki <aamine@loveruby.net>
2 19
3 20 * class.c: add #include "version.h".
@@ -6,6 +23,19 @@ Mon May 19 16:13:57 2003 Minero Aoki <aamine@loveruby.net>
6 23
7 24 * string.c: ditto.
8 25
  26 +Mon May 19 15:33:27 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
  27 +
  28 + * eval.c (localjump_xvalue): renamed exitstatus to exit_value
  29 + since it's not exit "status" after all.
  30 +
  31 + * eval.c (localjump_error): add reason to LocalJumpError.
  32 +
  33 + * compar.c (rb_cmpint): raise error via rb_cmperr(), if cmp value
  34 + is nil. now take new 2 arguments.
  35 +
  36 + * time.c (time_cmp): 2003-05-16 fix was incomplete.
  37 + (ruby-bugs-ja:PR#458)
  38 +
9 39 Mon May 19 14:42:50 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
10 40
11 41 * object.c (rb_mod_cmp): stupid comparison fixed.
@@ -76,6 +106,7 @@ Fri May 16 23:55:50 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
76 106 Fri May 16 12:40:40 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
77 107
78 108 * eval.c (block_pass): chain previous block to the pushing block.
  109 + [ruby-list:37677]
79 110
80 111 * time.c (time_cmp): does not compare with numbers for
81 112 interchangeability. (ruby-bugs-ja:PR#458)
14 array.c
@@ -935,10 +935,12 @@ get_inspect_tbl(create)
935 935 {
936 936 VALUE inspect_tbl = rb_thread_local_aref(rb_thread_current(), inspect_key);
937 937
938   - if (create && NIL_P(inspect_tbl)) {
939   - tbl_init:
940   - inspect_tbl = rb_ary_new();
941   - rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
  938 + if (NIL_P(inspect_tbl)) {
  939 + if (create) {
  940 + tbl_init:
  941 + inspect_tbl = rb_ary_new();
  942 + rb_thread_local_aset(rb_thread_current(), inspect_key, inspect_tbl);
  943 + }
942 944 }
943 945 else if (TYPE(inspect_tbl) != T_ARRAY) {
944 946 rb_warn("invalid inspect_tbl value");
@@ -1084,7 +1086,7 @@ sort_1(a, b)
1084 1086 VALUE *a, *b;
1085 1087 {
1086 1088 VALUE retval = rb_yield(rb_assoc_new(*a, *b));
1087   - return rb_cmpint(retval);
  1089 + return rb_cmpint(retval, *a, *b);
1088 1090 }
1089 1091
1090 1092 static int
@@ -1104,7 +1106,7 @@ sort_2(ap, bp)
1104 1106 }
1105 1107
1106 1108 retval = rb_funcall(a, id_cmp, 1, b);
1107   - return rb_cmpint(retval);
  1109 + return rb_cmpint(retval, a, b);
1108 1110 }
1109 1111
1110 1112 static VALUE
19 compar.c
@@ -17,9 +17,12 @@ VALUE rb_mComparable;
17 17 static ID cmp;
18 18
19 19 int
20   -rb_cmpint(val)
21   - VALUE val;
  20 +rb_cmpint(val, a, b)
  21 + VALUE val, a, b;
22 22 {
  23 + if (NIL_P(val)) {
  24 + rb_cmperr(a, b);
  25 + }
23 26 if (FIXNUM_P(val)) return FIX2INT(val);
24 27 if (TYPE(val) == T_BIGNUM) {
25 28 if (RBIGNUM(val)->sign) return 1;
@@ -43,7 +46,7 @@ rb_cmperr(x, y)
43 46 else {
44 47 classname = rb_obj_classname(y);
45 48 }
46   - rb_raise(rb_eArgError, "comparison of %s to %s failed",
  49 + rb_raise(rb_eArgError, "comparison of %s with %s failed",
47 50 rb_obj_classname(x), classname);
48 51 }
49 52
@@ -60,7 +63,7 @@ cmp_equal(x, y)
60 63 c = rb_funcall(x, cmp, 1, y);
61 64 if (NIL_P(c)) return Qnil;
62 65 if (c == INT2FIX(0)) return Qtrue;
63   - if (rb_cmpint(c) == 0) return Qtrue;
  66 + if (rb_cmpint(c, x, y) == 0) return Qtrue;
64 67 return Qfalse;
65 68 }
66 69
@@ -71,7 +74,7 @@ cmp_gt(x, y)
71 74 VALUE c = rb_funcall(x, cmp, 1, y);
72 75
73 76 if (NIL_P(c)) return cmperr();
74   - if (rb_cmpint(c) > 0) return Qtrue;
  77 + if (rb_cmpint(c, x, y) > 0) return Qtrue;
75 78 return Qfalse;
76 79 }
77 80
@@ -82,7 +85,7 @@ cmp_ge(x, y)
82 85 VALUE c = rb_funcall(x, cmp, 1, y);
83 86
84 87 if (NIL_P(c)) return cmperr();
85   - if (rb_cmpint(c) >= 0) return Qtrue;
  88 + if (rb_cmpint(c, x, y) >= 0) return Qtrue;
86 89 return Qfalse;
87 90 }
88 91
@@ -93,7 +96,7 @@ cmp_lt(x, y)
93 96 VALUE c = rb_funcall(x, cmp, 1, y);
94 97
95 98 if (NIL_P(c)) return cmperr();
96   - if (rb_cmpint(c) < 0) return Qtrue;
  99 + if (rb_cmpint(c, x, y) < 0) return Qtrue;
97 100 return Qfalse;
98 101 }
99 102
@@ -104,7 +107,7 @@ cmp_le(x, y)
104 107 VALUE c = rb_funcall(x, cmp, 1, y);
105 108
106 109 if (NIL_P(c)) return cmperr();
107   - if (rb_cmpint(c) <= 0) return Qtrue;
  110 + if (rb_cmpint(c, x, y) <= 0) return Qtrue;
108 111 return Qfalse;
109 112 }
110 113
25 enum.c
@@ -156,23 +156,23 @@ collect_all(i, ary)
156 156 }
157 157
158 158 static VALUE
159   -enum_to_a(obj)
  159 +enum_collect(obj)
160 160 VALUE obj;
161 161 {
162 162 VALUE ary = rb_ary_new();
163 163
164   - rb_iterate(rb_each, obj, collect_all, ary);
  164 + rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
165 165
166 166 return ary;
167 167 }
168 168
169 169 static VALUE
170   -enum_collect(obj)
  170 +enum_to_a(obj)
171 171 VALUE obj;
172 172 {
173 173 VALUE ary = rb_ary_new();
174 174
175   - rb_iterate(rb_each, obj, rb_block_given_p() ? collect_i : collect_all, ary);
  175 + rb_iterate(rb_each, obj, collect_all, ary);
176 176
177 177 return ary;
178 178 }
@@ -264,7 +264,7 @@ sort_by_cmp(a, b)
264 264 VALUE retval;
265 265
266 266 retval = rb_funcall(RARRAY(*a)->ptr[0], id_cmp, 1, RARRAY(*b)->ptr[0]);
267   - return rb_cmpint(retval);
  267 + return rb_cmpint(retval, *a, *b);
268 268 }
269 269
270 270 static VALUE
@@ -274,7 +274,12 @@ enum_sort_by(obj)
274 274 VALUE ary;
275 275 long i;
276 276
277   - ary = rb_ary_new2((TYPE(obj) == T_ARRAY) ? RARRAY(obj)->len : 2000);
  277 + if (TYPE(obj) == T_ARRAY) {
  278 + ary = rb_ary_new2(RARRAY(obj)->len);
  279 + }
  280 + else {
  281 + ary = rb_ary_new();
  282 + }
278 283 rb_iterate(rb_each, obj, sort_by_i, ary);
279 284 if (RARRAY(ary)->len > 1) {
280 285 qsort(RARRAY(ary)->ptr, RARRAY(ary)->len, sizeof(VALUE), sort_by_cmp);
@@ -374,7 +379,7 @@ min_i(i, memo)
374 379 }
375 380 else {
376 381 cmp = rb_funcall(i, id_cmp, 1, memo->u1.value);
377   - if (rb_cmpint(cmp) < 0) {
  382 + if (rb_cmpint(cmp, i, memo->u1.value) < 0) {
378 383 memo->u1.value = i;
379 384 }
380 385 }
@@ -393,7 +398,7 @@ min_ii(i, memo)
393 398 }
394 399 else {
395 400 cmp = rb_yield(rb_assoc_new(i, memo->u1.value));
396   - if (rb_cmpint(cmp) < 0) {
  401 + if (rb_cmpint(cmp, i, memo->u1.value) < 0) {
397 402 memo->u1.value = i;
398 403 }
399 404 }
@@ -425,7 +430,7 @@ max_i(i, memo)
425 430 }
426 431 else {
427 432 cmp = rb_funcall(i, id_cmp, 1, memo->u1.value);
428   - if (rb_cmpint(cmp) > 0) {
  433 + if (rb_cmpint(cmp, i, memo->u1.value) > 0) {
429 434 memo->u1.value = i;
430 435 }
431 436 }
@@ -444,7 +449,7 @@ max_ii(i, memo)
444 449 }
445 450 else {
446 451 cmp = rb_yield(rb_assoc_new(i, memo->u1.value));
447   - if (rb_cmpint(cmp) > 0) {
  452 + if (rb_cmpint(cmp, i, memo->u1.value) > 0) {
448 453 memo->u1.value = i;
449 454 }
450 455 }
62 eval.c
@@ -628,6 +628,7 @@ struct BLOCK {
628 628 struct RVarmap *dyna_vars;
629 629 VALUE orig_thread;
630 630 VALUE wrapper;
  631 + struct BLOCK *outer;
631 632 struct BLOCK *prev;
632 633 };
633 634
@@ -658,6 +659,7 @@ new_blktag()
658 659 _block.frame.node = ruby_current_node;\
659 660 _block.scope = ruby_scope; \
660 661 _block.prev = ruby_block; \
  662 + _block.outer = ruby_block; \
661 663 _block.iter = ruby_iter->iter; \
662 664 _block.vmode = scope_vmode; \
663 665 _block.flags = BLOCK_D_SCOPE; \
@@ -1477,20 +1479,45 @@ rb_eval_string_wrap(str, state)
1477 1479 }
1478 1480
1479 1481 static void
1480   -localjump_error(mesg, status)
  1482 +localjump_error(mesg, status, reason)
1481 1483 const char *mesg;
1482 1484 VALUE status;
  1485 + int reason;
1483 1486 {
1484 1487 VALUE exc = rb_exc_new2(rb_eLocalJumpError, mesg);
1485   - rb_iv_set(exc, "@status", status);
  1488 + VALUE id;
  1489 +
  1490 + rb_iv_set(exc, "@exit_value", status);
  1491 + switch (reason) {
  1492 + case TAG_BREAK:
  1493 + id = rb_intern("break"); break;
  1494 + case TAG_REDO:
  1495 + id = rb_intern("redo"); break;
  1496 + case TAG_RETRY:
  1497 + id = rb_intern("retry"); break;
  1498 + case TAG_NEXT:
  1499 + id = rb_intern("next"); break;
  1500 + case TAG_RETURN:
  1501 + id = rb_intern("return"); break;
  1502 + default:
  1503 + id = rb_intern("noreason"); break;
  1504 + }
  1505 + rb_iv_set(exc, "@reason", ID2SYM(id));
1486 1506 rb_exc_raise(exc);
1487 1507 }
1488 1508
1489 1509 static VALUE
1490   -localjump_exitstatus(exc)
  1510 +localjump_xvalue(exc)
  1511 + VALUE exc;
  1512 +{
  1513 + return rb_iv_get(exc, "@exit_value");
  1514 +}
  1515 +
  1516 +static VALUE
  1517 +localjump_reason(exc)
1491 1518 VALUE exc;
1492 1519 {
1493   - return rb_iv_get(exc, "@status");
  1520 + return rb_iv_get(exc, "@reason");
1494 1521 }
1495 1522
1496 1523 static void
@@ -1505,19 +1532,19 @@ jump_tag_but_local_jump(state)
1505 1532 case 0:
1506 1533 break;
1507 1534 case TAG_RETURN:
1508   - localjump_error("unexpected return", val);
  1535 + localjump_error("unexpected return", val, state);
1509 1536 break;
1510 1537 case TAG_NEXT:
1511   - localjump_error("unexpected next", val);
  1538 + localjump_error("unexpected next", val, state);
1512 1539 break;
1513 1540 case TAG_BREAK:
1514   - localjump_error("unexpected break", val);
  1541 + localjump_error("unexpected break", val, state);
1515 1542 break;
1516 1543 case TAG_REDO:
1517   - localjump_error("unexpected redo", Qnil);
  1544 + localjump_error("unexpected redo", Qnil, state);
1518 1545 break;
1519 1546 case TAG_RETRY:
1520   - localjump_error("retry outside of rescue clause", Qnil);
  1547 + localjump_error("retry outside of rescue clause", Qnil, state);
1521 1548 break;
1522 1549 default:
1523 1550 JUMP_TAG(state);
@@ -1897,7 +1924,7 @@ copy_node_scope(node, rval)
1897 1924 #define BEGIN_CALLARGS do {\
1898 1925 struct BLOCK *tmp_block = ruby_block;\
1899 1926 if (ruby_iter->iter == ITER_PRE) {\
1900   - ruby_block = ruby_block->prev;\
  1927 + ruby_block = ruby_block->outer;\
1901 1928 }\
1902 1929 PUSH_ITER(ITER_NOT)
1903 1930
@@ -3967,7 +3994,7 @@ rb_yield_0(val, self, klass, pcall, avalue)
3967 3994 static unsigned serial = 1;
3968 3995
3969 3996 if (!rb_block_given_p()) {
3970   - localjump_error("no block given", Qnil);
  3997 + localjump_error("no block given", Qnil, 0);
3971 3998 }
3972 3999
3973 4000 PUSH_VARS();
@@ -6805,7 +6832,7 @@ proc_invoke(proc, args, pcall, self)
6805 6832 break;
6806 6833 case TAG_RETRY:
6807 6834 if (pcall || orphan) {
6808   - localjump_error("retry from proc-closure", Qnil);
  6835 + localjump_error("retry from proc-closure", Qnil, state);
6809 6836 }
6810 6837 /* fall through */
6811 6838 case TAG_BREAK:
@@ -6813,7 +6840,7 @@ proc_invoke(proc, args, pcall, self)
6813 6840 result = prot_tag->retval;
6814 6841 }
6815 6842 else if (orphan) {
6816   - localjump_error("break from proc-closure", prot_tag->retval);
  6843 + localjump_error("break from proc-closure", prot_tag->retval, state);
6817 6844 }
6818 6845 else {
6819 6846 ruby_block->tag->dst = incoming_state;
@@ -6822,7 +6849,7 @@ proc_invoke(proc, args, pcall, self)
6822 6849 break;
6823 6850 case TAG_RETURN:
6824 6851 if (orphan) { /* orphan procedure */
6825   - localjump_error("return from proc-closure", prot_tag->retval);
  6852 + localjump_error("return from proc-closure", prot_tag->retval, state);
6826 6853 }
6827 6854 /* fall through */
6828 6855 default:
@@ -6988,7 +7015,7 @@ block_pass(self, node)
6988 7015 /* PUSH BLOCK from data */
6989 7016 old_block = ruby_block;
6990 7017 _block = *data;
6991   - _block.prev = old_block;
  7018 + _block.outer = ruby_block;
6992 7019 ruby_block = &_block;
6993 7020 PUSH_ITER(ITER_PRE);
6994 7021 ruby_frame->iter = ITER_PRE;
@@ -7035,7 +7062,7 @@ block_pass(self, node)
7035 7062 goto retry;
7036 7063 case TAG_RETURN:
7037 7064 if (orphan) {
7038   - localjump_error("return from proc-closure", prot_tag->retval);
  7065 + localjump_error("return from proc-closure", prot_tag->retval, state);
7039 7066 }
7040 7067 default:
7041 7068 JUMP_TAG(state);
@@ -7445,7 +7472,8 @@ void
7445 7472 Init_Proc()
7446 7473 {
7447 7474 rb_eLocalJumpError = rb_define_class("LocalJumpError", rb_eStandardError);
7448   - rb_define_method(rb_eLocalJumpError, "exitstatus", localjump_exitstatus, 0);
  7475 + rb_define_method(rb_eLocalJumpError, "exit_value", localjump_xvalue, 0);
  7476 + rb_define_method(rb_eLocalJumpError, "reason", localjump_reason, 0);
7449 7477
7450 7478 rb_eSysStackError = rb_define_class("SystemStackError", rb_eStandardError);
7451 7479
3  ext/pty/pty.c
@@ -300,6 +300,7 @@ pty_finalize_syswait(info)
300 300 struct pty_info *info;
301 301 {
302 302 rb_thread_kill(info->thread);
  303 + rb_funcall(info->thread, rb_intern("value"), 0);
303 304 rb_detach_process(info->child_pid);
304 305 return Qnil;
305 306 }
@@ -438,9 +439,9 @@ pty_getpty(argc, argv, self)
438 439
439 440 thinfo.thread = rb_thread_create(pty_syswait, (void*)&info);
440 441 thinfo.child_pid = info.child_pid;
  442 + rb_thread_schedule();
441 443
442 444 if (rb_block_given_p()) {
443   -
444 445 rb_ensure(rb_yield, res, pty_finalize_syswait, (VALUE)&thinfo);
445 446 return Qnil;
446 447 }
2  intern.h
@@ -121,7 +121,7 @@ void rb_define_private_method _((VALUE, const char*, VALUE (*)(ANYARGS), int));
121 121 void rb_define_singleton_method _((VALUE, const char*, VALUE(*)(ANYARGS), int));
122 122 VALUE rb_singleton_class _((VALUE));
123 123 /* compar.c */
124   -int rb_cmpint _((VALUE));
  124 +int rb_cmpint _((VALUE, VALUE, VALUE));
125 125 NORETURN(void rb_cmperr _((VALUE, VALUE)));
126 126 /* enum.c */
127 127 /* error.c */
6 range.c
@@ -126,7 +126,7 @@ r_lt(a, b)
126 126 VALUE r = rb_funcall(a, id_cmp, 1, b);
127 127
128 128 if (NIL_P(r)) return Qfalse;
129   - if (rb_cmpint(r) < 0) return Qtrue;
  129 + if (rb_cmpint(r, a, b) < 0) return Qtrue;
130 130 return Qfalse;
131 131 }
132 132
@@ -137,7 +137,7 @@ r_le(a, b)
137 137 VALUE r = rb_funcall(a, id_cmp, 1, b);
138 138
139 139 if (NIL_P(r)) return Qfalse;
140   - if (rb_cmpint(r) <= 0) return Qtrue;
  140 + if (rb_cmpint(r, a, b) <= 0) return Qtrue;
141 141 return Qfalse;
142 142 }
143 143
@@ -149,7 +149,7 @@ r_gt(a,b)
149 149 VALUE r = rb_funcall(a, id_cmp, 1, b);
150 150
151 151 if (NIL_P(r)) return Qfalse;
152   - if (rb_cmpint(r) > 0) return Qtrue;
  152 + if (rb_cmpint(r, a, b) > 0) return Qtrue;
153 153 return Qfalse;
154 154 }
155 155
27 sample/test.rb
@@ -962,6 +962,28 @@ def f(a)
962 962 IterTest.new([[0,0]]).each0 {|x| test_ok(x == [0,0])}
963 963 IterTest.new([[8,8]]).each8 {|x| test_ok(x == [8,8])}
964 964
  965 +def m
  966 + test_ok(block_given?)
  967 +end
  968 +m{p 'test'}
  969 +
  970 +def m
  971 + test_ok(block_given?,&proc)
  972 +end
  973 +m{p 'test'}
  974 +
  975 +class C
  976 + include Enumerable
  977 + def initialize
  978 + @a = [1,2,3]
  979 + end
  980 + def each(&block)
  981 + @a.each(&block)
  982 + end
  983 +end
  984 +
  985 +test_ok(C.new.collect{|n| n} == [1,2,3])
  986 +
965 987 test_check "float"
966 988 test_ok(2.6.floor == 2)
967 989 test_ok((-2.6).floor == -3)
@@ -1526,6 +1548,11 @@ module Const2
1526 1548 STDERR.print "intentionally redefines TEST3, TEST4\n" if $VERBOSE
1527 1549 test_ok([TEST1,TEST2,TEST3,TEST4] == [1,2,6,8])
1528 1550
  1551 +
  1552 +test_ok((String <=> Object) == -1)
  1553 +test_ok((Object <=> String) == 1)
  1554 +test_ok((Array <=> String) == nil)
  1555 +
1529 1556 test_check "clone"
1530 1557 foo = Object.new
1531 1558 def foo.test
28 time.c
@@ -704,31 +704,15 @@ time_cmp(time1, time2)
704 704 long i;
705 705
706 706 GetTimeval(time1, tobj1);
707   - switch (TYPE(time2)) {
708   - case T_FIXNUM:
709   - i = FIX2LONG(time2);
710   - if (tobj1->tv.tv_sec == i) {
711   - if (tobj1->tv.tv_usec == 0)
712   - return INT2FIX(0);
713   - if (tobj1->tv.tv_usec > 0)
714   - return INT2FIX(1);
  707 + if (TYPE(time2) == T_DATA && RDATA(time2)->dfree == time_free) {
  708 + GetTimeval(time2, tobj2);
  709 + if (tobj1->tv.tv_sec == tobj2->tv.tv_sec) {
  710 + if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return INT2FIX(0);
  711 + if (tobj1->tv.tv_usec > tobj2->tv.tv_usec) return INT2FIX(1);
715 712 return INT2FIX(-1);
716 713 }
717   - if (tobj1->tv.tv_sec > i) return INT2FIX(1);
  714 + if (tobj1->tv.tv_sec > tobj2->tv.tv_sec) return INT2FIX(1);
718 715 return INT2FIX(-1);
719   -
720   - case T_DATA:
721   - if (RDATA(time2)->dfree == time_free) {
722   - GetTimeval(time2, tobj2);
723   - if (tobj1->tv.tv_sec == tobj2->tv.tv_sec) {
724   - if (tobj1->tv.tv_usec == tobj2->tv.tv_usec) return INT2FIX(0);
725   - if (tobj1->tv.tv_usec > tobj2->tv.tv_usec) return INT2FIX(1);
726   - return INT2FIX(-1);
727   - }
728   - if (tobj1->tv.tv_sec > tobj2->tv.tv_sec) return INT2FIX(1);
729   - return INT2FIX(-1);
730   - }
731   - break;
732 716 }
733 717
734 718 return Qnil;

0 comments on commit 293fdb4

Please sign in to comment.
Something went wrong with that request. Please try again.