dicebag 3.0.3 → 3.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dicebag.rb +5 -1
  2. metadata +1 -1
@@ -18,7 +18,7 @@
18
18
  # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
19
19
  # USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
- # dicelib.rb -- version: 3.0.3
21
+ # dicelib.rb -- version: 3.0.5
22
22
 
23
23
  require 'parslet'
24
24
 
@@ -146,6 +146,10 @@ module DiceBag
146
146
  begin
147
147
  tree = Parser.new.parse(dstr)
148
148
  ast = Transform.new.apply(tree)
149
+
150
+ # Sometimes, we get a hash back, so wrap it as
151
+ # a single element array.
152
+ ast = [ast] unless ast.is_a?(Array)
149
153
 
150
154
  return normalize_tree(ast)
151
155
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dicebag
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.3
4
+ version: 3.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: