public
Description: Rubinius, the Ruby VM
Homepage: http://rubini.us
Clone URL: git://github.com/evanphx/rubinius.git
Fixed some bugs in Bignum.

 * Bignum#>> now returns -1/0 when given a Bignum
 * Bignum#eql? now returns false if given no Bignum.
NoKarma (author)
Tue May 13 01:40:27 -0700 2008
commit  40dcef8eb366750f795c6825fedeb9e8073f0bc1
tree    292486a25c2c3543df6a3f26fe09ee7ac27e9392
parent  5b96c2543edb96bce6760326fcb89643e45c9202
...
40
41
42
43
 
44
45
46
...
53
54
55
56
 
57
58
 
59
60
61
...
40
41
42
 
43
44
45
46
...
53
54
55
 
56
57
 
58
59
60
61
0
@@ -40,7 +40,7 @@ class Bignum < Integer
0
   def >>(s)
0
     s = Type.coerce_to(s, Integer, :to_int)
0
     return self << -s if s < 0
0
- if s > self.abs
0
+ unless s.is_a?(Fixnum)
0
       return 0 if self >= 0
0
       return -1 if self < 0
0
     end
0
@@ -53,9 +53,9 @@ class Bignum < Integer
0
     raise RangeError, "Object is out of range for a Fixnum" unless s.is_a?(Fixnum)
0
     s < 0 ? __bignum_right_shift__(-s) : __bignum_left_shift__(s)
0
   end
0
-
0
+
0
   def eql?(value)
0
- return false unless value.kind_of?(Integer)
0
+ return false unless value.is_a?(Bignum)
0
 
0
     self == value
0
   end

Comments

    No one has commented yet.