lib/csl/loader.rb in csl-1.0.0.pre13 vs lib/csl/loader.rb in csl-1.0.0.pre14

- old
+ new

@@ -21,19 +21,25 @@ # The data will be passed on to the #parse method of the base class. # Typically, this will return a new instance of the class. # # @note # The base class is exepcted to define a #parse method. + # + # @raise ParseError + # + # @return [Style, Locale] the parsed CSL resource def load(input) case when input.respond_to?(:read) data = input.read when input.to_s =~ /^\s*</ - data = input + data = input.to_s else + input = input.to_s + case - when File.exists?(input.to_s) + when File.exists?(input) location = input when File.exists?(extend_name(input)) location = extend_name(input) when File.exists?(extend_path(input)) location = extend_path(input) \ No newline at end of file