Skip to content
Permalink
Browse files

remove a pointless class

  • Loading branch information
Alex Gaynor
Alex Gaynor committed Apr 21, 2013
1 parent 3d04293 commit 57dcafc9c569fb8bcc336cbb28a6173e817f49e0
@@ -68,10 +68,6 @@ def method(self, space):
raise space.error(space.w_NotImplementedError)


class Module(object):
pass


class ModuleDef(object):
def __init__(self, name, filepath):
self.name = name
@@ -1,7 +1,7 @@
from __future__ import absolute_import

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef


class Comparable(Module):
class Comparable(object):
moduledef = ModuleDef("Comparable", filepath=__file__)
@@ -1,7 +1,7 @@
from __future__ import absolute_import

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef


class Enumerable(Module):
class Enumerable(object):
moduledef = ModuleDef("Enumerable", filepath=__file__)
@@ -8,7 +8,7 @@

from topaz.coerce import Coerce
from topaz.error import RubyError, error_for_oserror
from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef
from topaz.modules.process import Process
from topaz.objects.bindingobject import W_BindingObject
from topaz.objects.exceptionobject import W_ExceptionObject
@@ -18,7 +18,7 @@
from topaz.objects.stringobject import W_StringObject


class Kernel(Module):
class Kernel(object):
moduledef = ModuleDef("Kernel", filepath=__file__)

@moduledef.method("class")
@@ -4,11 +4,11 @@

from rpython.rlib import rfloat

from topaz.module import Module, ModuleDef, ClassDef
from topaz.module import ModuleDef, ClassDef
from topaz.objects.exceptionobject import W_StandardError, new_exception_allocate


class Math(Module):
class Math(object):
moduledef = ModuleDef("Math", filepath=__file__)

@moduledef.setup_module
@@ -2,7 +2,7 @@

from rpython.rlib import rgc, jit

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef
from topaz.objects.objectobject import W_BaseObject


@@ -18,7 +18,7 @@ def clear_gcflag_extra(pending):
pending.extend(rgc.get_rpy_referents(gcref))


class ObjectSpace(Module):
class ObjectSpace(object):
moduledef = ModuleDef("ObjectSpace", filepath=__file__)

@moduledef.function("each_object")
@@ -1,17 +1,19 @@
from __future__ import absolute_import

import os
import sys

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef
from topaz.system import IS_WINDOWS


if IS_WINDOWS:
def geteuid():
return 0 # MRI behaviour on windows
# MRI behaviour on windows
return 0

def fork():
raise NotImplementedError("fork on windows")

def WEXITSTATUS(status):
return status
else:
@@ -20,7 +22,7 @@ def WEXITSTATUS(status):
WEXITSTATUS = os.WEXITSTATUS


class Process(Module):
class Process(object):
moduledef = ModuleDef("Process", filepath=__file__)

@moduledef.function("euid")
@@ -1,9 +1,9 @@
from __future__ import absolute_import

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef


class Signal(Module):
class Signal(object):
moduledef = ModuleDef("Signal", filepath=__file__)

@moduledef.function("trap")
@@ -3,11 +3,11 @@

from rpython.rlib.rarithmetic import intmask

from topaz.module import Module, ModuleDef
from topaz.module import ModuleDef
from topaz.objects.classobject import W_ClassObject


class Topaz(Module):
class Topaz(object):
moduledef = ModuleDef("Topaz", filepath=__file__)

@moduledef.setup_module
@@ -23,12 +23,11 @@ def method_intmask(self, space, w_int):
return space.newint(intmask(bigint.uintmask()))

@moduledef.function("convert_type", method="symbol")
def method_coerce_int(self, space, w_obj, w_type, method):
def method_convert_type(self, space, w_obj, w_type, method):
if not isinstance(w_type, W_ClassObject):
raise space.error(space.w_TypeError, "type argument must be a class")
return space.convert_type(w_obj, w_type, method)

@moduledef.function("compare")
def method_compare(self, space, w_a, w_b, block=None):
return space.compare(w_a, w_b, block)

0 comments on commit 57dcafc

Please sign in to comment.