Skip to content
This repository
Browse code

Preparing release 1.5.1.

  • Loading branch information...
commit 36f9351183922b8d6901ae0f028f78c0392b5194 1 parent 0909d92
janfri authored
3  Changelog
... ...
@@ -1,3 +1,6 @@
  1
+v1.5.1
  2
+- Make rational values work on Ruby 1.8.7.
  3
+
1 4
 v1.5.0
2 5
 - Supporting exiftool command-line option -m.
3 6
   rubyforge request [#29587]
7  lib/mini_exiftool.rb
@@ -16,6 +16,7 @@
16 16
 require 'fileutils'
17 17
 require 'tempfile'
18 18
 require 'pstore'
  19
+require 'rational'
19 20
 require 'set'
20 21
 require 'shellwords'
21 22
 require 'time'
@@ -32,7 +33,7 @@ class MiniExiftool
32 33
   attr_reader :filename
33 34
   attr_accessor :numerical, :composite, :convert_encoding, :ignore_minor_errors, :errors, :timestamps
34 35
 
35  
-  VERSION = '1.5.0'
  36
+  VERSION = '1.5.1'
36 37
 
37 38
   # +opts+ support at the moment
38 39
   # * <code>:numerical</code> for numerical values, default is +false+
@@ -345,8 +346,8 @@ def parse_line line
345 346
         # nothing => String
346 347
       when /^-?\d+$/
347 348
         value = value.to_i
348  
-      when %r(^\d+/\d+$)
349  
-        value = Rational(value)
  349
+      when %r(^(\d+)/(\d+)$)
  350
+        value = Rational($1.to_i, $2.to_i)
350 351
       when /^[\d ]+$/
351 352
         # nothing => String
352 353
       when /#{@@separator}/

0 notes on commit 36f9351

Please sign in to comment.
Something went wrong with that request. Please try again.