Skip to content
Permalink
Browse files

fix NameError.new spec

  • Loading branch information
timfel committed Mar 19, 2017
1 parent e23499b commit 1c7f1f910968b7d4aead1bedaf60aea7bfb2672b
Showing with 9 additions and 1 deletion.
  1. +0 −1 spec/tags/core/exception/name_error_tags.txt
  2. +9 −0 topaz/objects/exceptionobject.py

This file was deleted.

@@ -159,6 +159,15 @@ class W_NameError(W_StandardError):
classdef = ClassDef("NameError", W_StandardError.classdef)
method_allocate = new_exception_allocate(classdef)

@classdef.method("initialize")
def method_initialize(self, space, w_msg=None, w_name=None):
W_ExceptionObject.method_initialize(self, space, w_msg)
self.w_name = w_name or space.w_nil

@classdef.method("name")
def method_name(self, space):
return self.w_name


class W_NoMethodError(W_NameError):
classdef = ClassDef("NoMethodError", W_NameError.classdef)

0 comments on commit 1c7f1f9

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