Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

passing an odd number of elements while hash creation now throws X::H…

…ash::Store::Oddnumber
  • Loading branch information...
commit 584be639175ca944cc03d7c63d10286dbf324ad1 1 parent fc96b6d
Siddhant Saraf authored February 28, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  src/core/Hash.pm
4  src/core/Hash.pm
... ...
@@ -1,3 +1,5 @@
  1
+my class X::Hash::Store::OddNumber { ... }
  2
+
1 3
 my class Hash {
2 4
     # Has attributes and parent EnumMap declared in BOOTSTRAP
3 5
 
@@ -44,7 +46,7 @@ my class Hash {
44 46
             }
45 47
             elsif $items { self.STORE_AT_KEY($x.Str, $items.shift) }
46 48
             else {
47  
-                die 'Odd number of elements found where hash expected'
  49
+                die(X::Hash::Store::OddNumber.new())
48 50
             }
49 51
         }
50 52
         self

0 notes on commit 584be63

Please sign in to comment.
Something went wrong with that request. Please try again.