lib/i18n-spec/models/locale_file.rb in i18n-spec-0.4.0 vs lib/i18n-spec/models/locale_file.rb in i18n-spec-0.4.1

- old
+ new

@@ -63,13 +63,19 @@ @errors[:missing_pluralization_keys] = return_data if return_data.any? return_data end def is_parseable? + if RUBY_VERSION < "1.9.3" + yaml_parse_exception = YAML::ParseError + else + yaml_parse_exception = YAML::SyntaxError + end + begin yaml_load_content true - rescue YAML::ParseError => e + rescue yaml_parse_exception => e @errors[:unparseable] = e.to_s false rescue ArgumentError => e @errors[:unparseable] = e.to_s false