lib/latex/decode.rb in latex-decode-0.0.6 vs lib/latex/decode.rb in latex-decode-0.0.7

- old
+ new

@@ -25,12 +25,12 @@ module LaTeX class << self def decode (string) - return string unless string.is_a? String + return string unless string.respond_to?(:to_s) - string = string.dup + string = string.is_a?(String) ? string.dup : string.to_s Decode::Base.normalize(string) Decode::Accents.decode!(string) Decode::Diacritics.decode!(string) \ No newline at end of file