Skip to content

Commit

Permalink
Add a Hash.new that takes a default object.
Browse files Browse the repository at this point in the history
  • Loading branch information
treed committed Jul 16, 2009
1 parent f6dbd6a commit 4cdc142
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/classes/Hash.pir
Expand Up @@ -349,7 +349,14 @@ property instead.
.namespace ['Hash']
.sub 'new' :method
.sub 'new' :method :multi(_,P)
.param pmc default
$P0 = new 'CardinalHash'
setattribute $P0, 'default', default
.return ($P0)
.end
.sub 'new' :method :multi(_,'Sub')
.param pmc a :optional :named('!BLOCK')
$P0 = new 'CardinalHash'
setattribute $P0, 'default', a
Expand Down

0 comments on commit 4cdc142

Please sign in to comment.