From 3e80324363d998cf72fbb7fbac5ddd805537aa23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aslak=20Helles=C3=B8y?= Date: Sun, 8 Nov 2009 10:24:31 +0100 Subject: [PATCH] Added a guard that gives a better error message. --- lib/cucumber/ast/tags.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/cucumber/ast/tags.rb b/lib/cucumber/ast/tags.rb index e868716424..d381bc6073 100644 --- a/lib/cucumber/ast/tags.rb +++ b/lib/cucumber/ast/tags.rb @@ -13,6 +13,7 @@ class Tags #:nodoc: class And #:nodoc: def initialize(tag_names) + raise "tag_names was #{tag_names.inspect} (#{tag_names.class}) - expected it to be Array" unless Array === tag_names @negative_tags, @positive_tags = tag_names.partition{|tag_name| Tags.exclude_tag?(tag_name)} @negative_tags = Tags.strip_negative_char(@negative_tags) end