lib/sup/label.rb in sup-0.8.1 vs lib/sup/label.rb in sup-0.9

- old
+ new

@@ -20,12 +20,10 @@ end @labels = {} @new_labels = {} @modified = false labels.each { |t| @labels[t] = true } - - self.class.i_am_the_instance self end def new_label? l; @new_labels.include?(l) end ## all labels user-defined and system, ordered @@ -59,12 +57,12 @@ l2 else l end end - + def << t - t = t.intern unless t.is_a? Symbol + raise ArgumentError, "expecting a symbol" unless t.is_a? Symbol unless @labels.member?(t) || RESERVED_LABELS.member?(t) @labels[t] = true @new_labels[t] = true @modified = true end