lib/polyglot.rb in polyglot-0.3.0 vs lib/polyglot.rb in polyglot-0.3.1

- old
+ new

@@ -1,6 +1,5 @@ -$:.unshift File.dirname(__FILE__) require 'pathname' module Polyglot @registrations ||= {} # Guard against reloading @loaded ||= {} @@ -15,10 +14,10 @@ raise @le end end def self.register(extension, klass) - extension = [extension] unless Enumerable === extension + extension = [extension] unless Array === extension extension.each{|e| @registrations[e] = klass } end