Skip to content
Permalink
Browse files

Merge pull request #748 from kachick/fix-hash-initialize

Fix Hash#initialize
  • Loading branch information
alex committed Jun 3, 2013
2 parents f16df06 + ffad2fd commit fc1f6986474864e58fd03b8171d7fa476795709f
Showing with 2 additions and 2 deletions.
  1. +0 −2 spec/tags/core/hash/initialize_tags.txt
  2. +2 −0 topaz/objects/hashobject.py
@@ -1,3 +1 @@
fails:Hash#initialize is private
fails:Hash#initialize returns self
fails:Hash#initialize raises a RuntimeError if called on a frozen instance
@@ -26,11 +26,13 @@ def method_try_convert(self, space, w_obj):
return w_obj

@classdef.method("initialize")
@check_frozen()
def method_initialize(self, space, w_default=None, block=None):
if w_default is not None:
self.w_default = w_default
if block is not None:
self.default_proc = block
return self

@classdef.method("default")
def method_default(self, space, w_key=None):

0 comments on commit fc1f698

Please sign in to comment.