Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
passing an odd number of elements while hash creation now throws X::H…
…ash::Store::Oddnumber
  • Loading branch information
Siddhant committed Feb 28, 2012
1 parent fc96b6d commit 584be63
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Hash.pm
@@ -1,3 +1,5 @@
my class X::Hash::Store::OddNumber { ... }

my class Hash {
# Has attributes and parent EnumMap declared in BOOTSTRAP

Expand Down Expand Up @@ -44,7 +46,7 @@ my class Hash {
}
elsif $items { self.STORE_AT_KEY($x.Str, $items.shift) }
else {
die 'Odd number of elements found where hash expected'
die(X::Hash::Store::OddNumber.new())
}
}
self
Expand Down

0 comments on commit 584be63

Please sign in to comment.