lib/csl/loader.rb in csl-1.0.0.pre1 vs lib/csl/loader.rb in csl-1.0.0.pre2

- old
+ new

@@ -23,13 +23,13 @@ when input.respond_to?(:read) data = input.read when input.to_s =~ /^\s*</ data = input else - + case - when File.exists?(input) + when File.exists?(input.to_s) location = input when File.exists?(extend_name(input)) location = extend_name(input) when File.exists?(extend_path(input)) location = extend_path(input) @@ -54,10 +54,10 @@ end # Extends the passed-in string to a style/locale name, by prefixing and # appending the default name prefix and extension. def extend_name(string) - if File.extname(string).empty? + if File.extname(string.to_s).empty? name = [string, extension].compact.join else name = string.to_s.dup end \ No newline at end of file