<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -14,12 +14,13 @@ module Dicelib
     
     def self.expr(str)
       raise ArgumentError, &quot;#{str} is not a string&quot; unless str.is_a?(String)
-      if str.match(/(\d+)d(\d+)/)
+      if str.match(/^(\d+)d(\d+)$/)
         dice = []
-        $~[1].to_i.times { dice &lt;&lt; Dice.new($~)}
+        $~[1].to_i.times { dice &lt;&lt; Dice.new($~[2]) }
       else
         raise ArgumentError, &quot;#{str.inspect} doesn't match the format&quot;
       end
+      new(*dice)
     end
     
     def add(*dice)</diff>
      <filename>lib/dicelib/roll.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>77932365ad3d561bbd726e7d3b824f511b9caa05</id>
    </parent>
  </parents>
  <author>
    <name>madx</name>
    <email>root@yapok.org</email>
  </author>
  <url>http://github.com/madx/dicelib/commit/90af0fb9a7fdfa00a893e82d4db6253821a2226c</url>
  <id>90af0fb9a7fdfa00a893e82d4db6253821a2226c</id>
  <committed-date>2008-06-11T01:51:50-07:00</committed-date>
  <authored-date>2008-06-11T01:51:50-07:00</authored-date>
  <message>Enhanced Roll::expr</message>
  <tree>52d40a741d5553cbd6183d35991a76ac6988bfdd</tree>
  <committer>
    <name>madx</name>
    <email>root@yapok.org</email>
  </committer>
</commit>
