~ubuntu-branches/ubuntu/vivid/ruby-i18n/vivid

« back to all changes in this revision

Viewing changes to lib/i18n/backend/base.rb

  • Committer: Package Import Robot
  • Author(s): Praveen Arimbrathodiyil
  • Date: 2013-06-03 19:20:31 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: package-import@ubuntu.com-20130603192031-qk11as87x3cotd1n
Tags: upstream-0.6.1
ImportĀ upstreamĀ versionĀ 0.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
        # Loads a YAML translations file. The data must have locales as
169
169
        # toplevel keys.
170
170
        def load_yml(filename)
171
 
          YAML.load_file(filename)
 
171
          begin
 
172
            YAML.load_file(filename)
 
173
          rescue TypeError
 
174
            nil
 
175
          rescue SyntaxError
 
176
            nil
 
177
          end
172
178
        end
173
179
    end
174
180
  end