Skip to content
Permalink
Browse files

make tags more precise, add Fixnum#~

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 4, 2013
1 parent 8b96593 commit 463ab5696e5deee1cdec534fae72372243d46c5a
@@ -1 +1,3 @@
fails:Fixnum#&
fails:Fixnum#& returns self bitwise AND other
fails:Fixnum#& returns self bitwise AND a Bignum
fails:Fixnum#& raises a TypeError when passed a Float
@@ -1 +1,2 @@
fails:Fixnum#|
fails:Fixnum#| returns self bitwise OR other
fails:Fixnum#| raises a TypeError when passed a Float
@@ -1 +1,3 @@
fails:Fixnum#^
fails:Fixnum#^ returns self bitwise EXCLUSIVE OR other
fails:Fixnum#^ returns self bitwise EXCLUSIVE OR a Bignum
fails:Fixnum#^ raises a TypeError when passed a Float

This file was deleted.

@@ -153,10 +153,8 @@ def method_pow(self, space, w_other):
[w_other]
)
else:
raise space.error(
space.w_TypeError,
"%s can't be coerced into Fixnum" %
space.obj_to_s(space.getclass(w_other))
raise space.error(space.w_TypeError,
"%s can't be coerced into Fixnum" % space.obj_to_s(space.getclass(w_other))
)

def method_pow_int_impl(self, space, w_other):
@@ -217,6 +215,10 @@ def method_xor(self, space, other):
def method_or(self, space, other):
return space.newint(self.intvalue | other)

@classdef.method("~")
def method_invert(self, space):
return space.newint(~self.intvalue)

@classdef.method("==")
def method_eq(self, space, w_other):
if isinstance(w_other, W_FixnumObject):

0 comments on commit 463ab56

Please sign in to comment.
You can’t perform that action at this time.